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: "sdyoung at miranda dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2007 17:18:53 -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 #4 from sdyoung at miranda dot org 2007-08-08 17:18 -------
I should clarify that the assembly below is generated from exactly the code I
included in my original bug report.
Furthermore, if it is being converted to 0xFFFFFFFD, then
#include <stdio.h>
int main(int argc, char **argv) {
int y = -2;
int x[y];
x[5000] = 4321;
}
should not segfault (which it does).
--
sdyoung at miranda dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33024