This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/8754: Allows illegal code
- From: reichelt at igpm dot rwth-aachen dot de
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, pere at hungry dot com
- Date: 29 Nov 2002 14:08:53 -0000
- Subject: Re: c/8754: Allows illegal code
- Reply-to: reichelt at igpm dot rwth-aachen dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, pere at hungry dot com, gcc-gnats at gcc dot gnu dot org
Synopsis: Allows illegal code
State-Changed-From-To: open->closed
State-Changed-By: reichelt
State-Changed-When: Fri Nov 29 06:08:52 2002
State-Changed-Why:
Not a bug.
Nested functions are a GNU extension, see
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Nested-Functions.html
If you specify -pedantic on the command line, you'll get a warning:
bug-gcc-double-main.c: In function `main':
bug-gcc-double-main.c:3: warning: ISO C forbids nested functions
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8754