[Bug c/21794] GCC accepts invalid code
--- Additional Comments From jsm28 at gcc dot gnu dot org 2005-05-28 10:45 --- c90-const-expr-2.c and c99-const-expr-2.c already contain assertions that (void *)(void *)0 is not a null pointer constant; this just part of the known constant expressions issues. *** This bug has been marked as a duplicate of 456 *** -- What|Removed |Added CC||jsm28 at gcc dot gnu dot org Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21794
[Bug c/21794] GCC accepts invalid code
--- Additional Comments From joseph at codesourcery dot com 2005-05-28 02:08 --- Subject: Re: New: GCC accepts invalid code On Sat, 28 May 2005, neil at gcc dot gnu dot org wrote: > gcc -Wall -ansi -pedantic -fsyntax-only > > erroneously accepts the following: > > void bar(void); > > void (*baz(void))(void) { return bar ? bar: (void *)(void *) 0; } This just looks like a special case of bug 456 to me. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21794