Re: argument names in function declarations

David Laight <[email protected]> Sun, 30 Aug 2009 16:42:38 +0100
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
On Tue, Aug 25, 2009 at 10:44:37AM -0400, der Mouse wrote:
> >> Does using leading underscores in the names help with the cpp issue?
> > Not really.  Particularly idiotic code and compilers can end up
> > treating the prototype-with-argument-names as a function declaration
> 
> Ummm...isn't that exactly what it is?  Or am I missing something?

The problem is that declarations like:

int foo(int j0);

Fall foul of the "declaration of 'j0' shadows global declaration"
when compiled with -Wshadow (and for the above #include <math.h>).

Perhaps gcc shouldn't be reporting such for parameters in function
declarations.

	David

-- 
David Laight: [email protected]