This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Fix warnings about type declarations inside prototypes


Richard Earnshaw wrote:

The following code snippet produces the following interesting
diagnostics :-)

void f(enum x {a, b, c} d);
void g(struct y {int a;} z);

en.c:1: warning: 'struct x' declared inside parameter list
en.c:1: warning: its scope is only this definition or declaration, which
is probably not what you want
en.c:2: warning: 'enum y' declared inside parameter list

Opps. Someone got the keywords messed up.

Fixed with:

2004-04-29 Richard Earnshaw <rearnsha@arm.com>

	* c-decl.c (get_parm_info): Use the correct tag keywords when
	warning about type declarations in prototypes.

If you've not yet checked this in, it's certainly OK.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]