[Bug c/17189] bogus warning for struct Foo { int; };

cvs-commit at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Oct 10 00:47:00 GMT 2004


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-10 00:47 -------
Subject: Bug 17189

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jsm28@gcc.gnu.org	2004-10-10 00:47:20

Modified files:
	gcc            : ChangeLog c-decl.c c-parse.in 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: anon-struct-5.c 

Log message:
	PR c/17189
	* c-decl.c (grokfield): Make diagnostic for bad cases of unnamed
	fields a pedwarn.  Pedwarn here for unnamed structs/unions if
	pedantic.
	* c-parse.in (component_decl): Don't pedwarn here for unnamed
	fields.
	
	testsuite:
	* gcc.dg/anon-struct-5.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5823&r2=2.5824
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.597&r2=1.598
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-parse.in.diff?cvsroot=gcc&r1=1.245&r2=1.246
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4424&r2=1.4425
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/anon-struct-5.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17189



More information about the Gcc-bugs mailing list