#define __need_XXX patch suggestion

Tony van der Hoff tony at mk-net.demon.co.uk
Wed Feb 13 04:54:13 PST 2002


On 13 Feb 2002, in message <m3wuxhacur.fsf at nick.ws.noc.dsvr.net>,
Nick Burrett <nick at dsvr.net> wrote:

> John Tytgat <John.Tytgat at aaug.net> writes:
> 
> > In order to reduce the number of warnings the Norcroft C compiler is
> > spitting during the UnixLib compilation, I would submit a patch which
> > changes all:
> > 
> > #define __need_XXX
> > 
> > into
> > 
> > #ifndef __need_XXX
> > #define __need_XXX
> > #endif
> > 
> > Any objections ?
> 
> Yeah, it's gonna make everything look a mess.  I think this is more
> of a problem with Norcroft C's pedantry.
> 
> I'm all for getting warnings fixed, but when it drastically reduces
> the readability of the header files, then I'm not so happy.  Anyway,
> doesn't Norcroft still complain about non-ANSI #includes ?

The latter can be suppressed with -Wp in the command line. 

I assume that John is referring to the "repeated definition of macro xx".
According to the manual this can be suppressed by omitting -Fh on the command
line, however, that also bypasses other potentially desirable pedantry. 


-- 
Tony van der Hoff         | MailTo:tony at mk-net.demon.co.uk
                          | MailTo:avanderhoff at iee.org
Buckinghamshire, England  | http:www.mk-net.demon.co.uk



More information about the gcc mailing list