Connecting Tech Pros Worldwide Help | Site Map

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

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 22nd, 2005, 11:31 PM
Maciej Pilichowski
Guest
 
Posts: n/a
Default How to lower warning level? [header wrappers, GCC]

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.

Thanks in advance for your help.

have a nice day
bye bye

--
Maciej "MACiAS" Pilichowski http://bantu.fm.interia.pl/

M A R G O T --> http://www.margot.cad.pl/
automatyczny tłumacz (wczesna wersja rozwojowa) angielsko-polski

  #2  
Old July 22nd, 2005, 11:31 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: How to lower warning level? [header wrappers, GCC]

"Maciej Pilichowski" <bantu@SKASUJTOpoczta.FM> wrote...[color=blue]
> The short version -- how to set warning level just for one specific
> file, or more exactly how to relax warning level for it?
> [...][/color]

There is no such concept in C++ _language_ as "warning level". Please
post your compiler-specific question to the compiler-dedicated forum.
In your case I suggest gnu.g++.* hierarchy.

V


  #3  
Old July 22nd, 2005, 11:31 PM
Alf P. Steinbach
Guest
 
Posts: n/a
Default Re: How to lower warning level? [header wrappers, GCC]

* Victor Bazarov:[color=blue]
> "Maciej Pilichowski" <bantu@SKASUJTOpoczta.FM> wrote...[color=green]
> > The short version -- how to set warning level just for one specific
> > file, or more exactly how to relax warning level for it?
> > [...][/color]
>
> There is no such concept in C++ _language_ as "warning level". Please
> post your compiler-specific question to the compiler-dedicated forum.
> In your case I suggest gnu.g++.* hierarchy.[/color]

Well, one possible non-tool-specific answer could be to use the PIMPL
idiom.

But in code that uses QT things all over that's perhaps not practical.

Anyway it's work work work when the point of using a library like QT is
(or should be) to avoid the work work work...

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
  #4  
Old July 22nd, 2005, 11:32 PM
Duane Hebert
Guest
 
Posts: n/a
Default Re: How to lower warning level? [header wrappers, GCC]


"Maciej Pilichowski" <bantu@SKASUJTOpoczta.FM> wrote in message news:a9j0u014270ee9kh5bkok1ca3lq9bb2hvg@4ax.com...[color=blue]
> 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.[/color]

Which version of GCC? Which version of Qt?
With VC7.1/Qt3.3 at warning level 4, there are
no Qt warnings. I've ported some of my stuff to
GCC with no problems.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.