This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17322] New: initializer folding broken
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Sep 2004 18:54:14 -0000
- Subject: [Bug c/17322] New: initializer folding broken
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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