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: "drow at false dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2007 18:51:47 -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 #10 from drow at gcc dot gnu dot org 2007-08-08 18:51 -------
Subject: Re: gcc allows negatively-sized arrays
On Wed, Aug 08, 2007 at 05:34:47PM -0000, sdyoung at miranda dot org wrote:
> main() {
> int y = 0xFFFFFFFD;
> int x[y];
> }
This is roughly equivalent to malloc (4GB). There is no requirement
on a C compiler to generate code for runtime bounds checking, and it
does not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33024