User forums > General (but related to Code::Blocks)
Compiling precompiled headers file with Code::Blocks
wwolf:
If this is a g++ problem, Code::Blocks cannot do much about it. But you can write a little program, in Perl, Awk, or even C++ using the Boost::RegExp library to filter out those warnings - count how many you have filtered out, and update the warning number. :) This means that you would call your wrapper instead of the g++ compiler, and the wrapper itself would run the compiler. I have done something similar ages ago for the fake warnings from the SUN compiler.
thomas:
I'm inclined to say that it is not a GCC/g++ problem, but a wxWidgets problem. They use long recursive macro chains that finally end up expanding to function attributes, and some of them are duplicate or in places where they shouldn't be, and the compiler tells you that it doesn't like it.
The good thing about it is that with this evil, ugly preprocessor hack, they somehow manage to compile their code on nearly every compiler from 15 year old ones to present ones. The bad thing is that you get so much noise, which effectively makes compiler warnings useless.
Compiling Code::Blocks with gcc 4.2 gives >2000 warnings from including the wxWidgets headers, compiling wxWidgets gives so many warnings that you cannot even count them (on the order of hundred thousands or millions).
Wwolf is right insofar as we can indeed not do much about it (nothing at all, actually). Just ignore it, or use the compiler option to turn off attribute warnings (this won't affect any other warnings).
killerbot:
--- Quote ---Wwolf is right insofar as we can indeed not do much about it (nothing at all, actually). Just ignore it, or use the compiler option to turn off attribute warnings (this won't affect any other warnings).
--- End quote ---
I think we should do that, what is the option ?
Biplab:
--- Quote from: killerbot on August 24, 2007, 11:22:31 am ---I think we should do that, what is the option ?
--- End quote ---
TDragon have already posted it. :)
--- Quote from: TDragon on August 24, 2007, 07:14:31 am ---Adding "-Wno-attributes" to the compiler options will get rid of most of the warnings.
--- End quote ---
yakumoklesk:
Well, I'll try the "-Wno_attributes" if this is the most convenient solution at hand.
Thanks for your replies.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version