bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libintl.h warnings with -Wundef


From: Ralf Wildenhues
Subject: Re: libintl.h warnings with -Wundef
Date: Sat, 20 Sep 2008 10:49:15 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Bruno,

* Bruno Haible wrote on Fri, Sep 19, 2008 at 03:08:28AM CEST:
> 
> This -Wundef option is pointless:

>   - Is its purpose to detect typos? No, because you recommend to avoid the
>     warning by using the idiom   (defined X && X).  But when I have a typo
>     in X and use this idiom nevertheless, copy&pasting the identifier as 
> usual,
>     my code will still be wrong and no warning will be flagged.

I would use "defined X && X" only for those identifiers which may well
be undefined, like those that come from the system, compiler, or from a
generated config.h file.  For others, where I know the identifier is
defined, but I would like to distinguish between its value (e.g. because
they are defined by my package header), a typo warning is helpful.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]