[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: #warning and non-GCC compilers
From: "Éric" Brunet <ebrunet () quatramaran ! ens ! fr>
Date: 2001-04-04 15:17:24
[Download RAW message or body]
In ens.mailing-lists.kde-devel, you wrote:
>kde-devel@thewrittenword.com wrote:
>>
>> For those of you adding #warning to your code, please wrap it with:
>>
>> #ifdef __GNUC__
>> #warning <blah>
>> #endif
>>
>> On some non-GNU compilers, IRIX C++ in particular, #warning causes the
>> compiler to generate an error (unknown preprocessing directive).
>>
>Most of them are wrapped. If you find some unwrapped, post patches. It's
>hard to grep for unwrapped ones
Maybe something like
---------------------------------------------------------------
serifos ~ $ gcc -E -U __GNUC__ foo.c > /dev/null
foo.c:6: warning: #warning <foo>
serifos ~ $ cat foo.c
#ifdef __GNUC__
#warning <blah>
#endif
#warning <foo>
serifos ~ $
---------------------------------------------------------------
would do the job ?
Éric Brunet
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic