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++/51731] code generation bug in negative indices in arrays on 64-bit targets


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).


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