This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/17322] New: initializer folding broken


Recent changes to the handling of structure references for C have broken
the folding of some valid initializers.

struct s { int a; int b[1]; };
struct s x;
int *y = ((struct s *)&x.a)->b;

involves a valid address constant, but is now wrongly rejected with

t.c:3: error: initializer element is not constant

-- 
           Summary: initializer folding broken
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 16620,16989
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17322


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]