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/33024] gcc allows negatively-sized arrays



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-08-08 17:27 -------
>should not segfault (which it does).

Not when you consider the stack pointer will wrap and increase (instead of
decrease) by 8.

Again this is only undefined C99.  (this code is invalid C90 and C++98 anyways
as variable length arrays are not in C90/C++98).


-- 

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


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