help-gplusplus
[Top][All Lists]
Advanced

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

Re: How to lower warning level? [header wrappers, GCC]


From: Guy Harrison
Subject: Re: How to lower warning level? [header wrappers, GCC]
Date: Fri, 14 Jan 2005 00:00:51 GMT
User-agent: KNode/0.8.1

Maciej Pilichowski wrote:

> Hello there,
> 
>   The short version -- how to set warning level just for one specific
> file, or more exactly how to relax warning level for it?
> 
>   The long version -- I try to work at maximum warning level
> /including -Werror/ but lately I have to work with QT and this library
> generates a lot of warnings. I have read on
> http://www.artima.com/cppsource/ C++ Coding Standards and tried to do
> something similar -- i.e. write a wrapper for all QT included headers.
> 
> I would be nice if this has actually worked out:
> 
> // my project -- top level of warnings
> 
> #pragma warnings_off
> #include qt_headers
> #pragma warnings_on
> 
> // my project -- top level of warnings
> 
>   But I couldn't find anything like this above in GCC. All I found is:
> 
> #pragma GCC system_header
> 
>   which should ignore any warnings. Maybe it is QT, maybe it is GCC --
> anyway, it doesn't help -- I have still a lot of warnings from QT.
>   So... how to get rid of QT warnings, but maintain top warn-level for
> the rest of the project.

There's a mailing list "QT Interest" which you can subscribe to and link is
on trolltech site. You'll be able to give an example of your problem there.

Generally, my solution is to not plonk stuff in the code wherever it can be
avoided (it gets to be a pita especially cross-platform) but to separate
the build into multiple makefiles. How that pans out though depends upon
the task in hand. :-(


reply via email to

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