Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: idhan on March 13, 2007, 01:30:54 am
-
Hi,
I am compiling some wxwidgets examples and I get some warrings (actually is always the same)
/usr/local/include/wx-2.8/wx/hashmap.h:714: warning: dereferencing type-punned pointer will break strict-aliasing rules
..
..
/usr/local/include/wx-2.8/wx/image.h:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
:: === Build finished: 0 errors, 10 warnings ===
Two question: How can I see the specific code-warning and after I know that..how can I disable this warning using the code-warning in the compilation process. But only that one, no others important warnings.
thanks for you help.
-
How can I see the specific code-warning
I'm not sure I understand this question...
and after I know that..how can I disable this warning using the code-warning in the compilation process.
This question is related more to GCC itself than Code::Blocks. You may be able to find an appropriate parameter in the GCC manual (http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/).
-
Hi,
I will give you an example: On visual studio I get some warning too (compiling some wxwidgets examples), but on visual studio I get not only the description warning also a number (or code), so, with that code I can disable this (or several) warning in the settings of my project (Disable Specific Warning: code1,code2,etc).
On Code::blocks I only get the description, but not the number or code of the warning and that is my problem, also I don't know if code::blocks has the settings (Disable Specific Warning) or I have to search for the gcc manual on read about it.
thanks again :-)
-
Hello, you can suppress specific warnings in compiler settings by using the other options tab. Like TDragon said, look into the gcc manual for details, how to suppress a specific warning:
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Warning-Options.html#Warning-Options (http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Warning-Options.html#Warning-Options)
Edit:
I think, the option you look for is: