This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33024] gcc allows negatively-sized arrays
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2007 17:27:33 -0000
- Subject: [Bug c/33024] gcc allows negatively-sized arrays
- References: <bug-33024-14955@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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