[Issue 5479] New: Can't take address of struct literal inside array initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 23 11:37:38 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5479

           Summary: Can't take address of struct literal inside array
                    initializer
           Product: D
           Version: 1.057
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: aziz.koeksal at gmail.com


--- Comment #0 from Aziz Köksal <aziz.koeksal at gmail.com> 2011-01-23 11:35:33 PST ---
Test case:

struct Identifier { char[] str; }

static const Identifier[] list = [
  {"someid"},
];

// Error: non-constant expression &(Identifier("someid"))
static const Identifier* Someid = &list[0];

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list