[Bug c++/51731] code generation bug in negative indices in arrays on 64-bit targets
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 2 17:10:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51731
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution| |INVALID
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-02 17:10:17 UTC ---
Having a zero-sized array at the end of a struct is surely a commonly used
technique, close to standard flexible array members, but that is not what you
are doing. Trying to reference data.e[-1] through data.e[-9] is of course not
valid C++ (nor C) when e is an array (it might be valid if e was a pointer and
pointed into the middle of some array).
More information about the Gcc-bugs
mailing list