[Bug c/33024] gcc allows negatively-sized arrays

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 8 16:55:00 GMT 2007



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-08-08 16:55 -------
This is not a bug, VLA's size is unsigned so -2 is converted over to
0xFFFFFFFD.  also sizeof gives back an unsigned type.  This is only undefined
behavior anyways.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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



More information about the Gcc-bugs mailing list