RFC: Avoiding #warning (C/C++ preprocessor extension)
Mirko Boehm
mirko at kde.org
Tue Nov 1 13:29:41 GMT 2005
On Monday 31 October 2005 16:11, Frans Englich wrote:
> I think it would be cool if for for example kdelibs, once the Qt port is
> over, that the compilation was made more strict, that the code gradually
> compiled with more warning flags. In cases where global enabled warnings
> can't be used, such as including C headers, compiling Bison parsers and
> similar, the warnings can be disabled locally with -W-no-*.
>
> GCC's warnings are for the most time valid and AFAICT everyone agrees that
> they shouldn't be there -- but no one cares enough for fixing it. Thus,
> adding "-Werror" and other options would raise the bar for what goes in and
> increase the general "tidyness". Just a thought.
The one problem I see is that if "pedantic" is turned on, we get lots of
warning messages from source code we do not have under our own control. I
would definitly like to be able to disable such warning for certain include
files, for example.
From what I know, gcc does not have a #pragma disable... to put around include
statements.
Is there a solution to this problem?
--Mirko.
--
KDE e.V.: http://ev.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051101/0fc20e54/attachment.sig>
More information about the kde-core-devel
mailing list