[Bug c/67882] surprising offsetof result on an invalid array member without diagnostic
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Nov 7 22:03:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67882
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |segher at gcc dot gnu.org
Resolution|FIXED |---
--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> ---
This patch regresses Linux build for 32-bit powerpc. We have code like
struct s {
int fpr[32][1];
int fpscr;
};
assert(offsetof(s, fpr[32][0]) == offsetof(s, fpscr));
which is well-defined code afaics; but after this patch GCC will not
allow it.
More information about the Gcc-bugs
mailing list