turn off warnings in gcc on linux

Yehezkel Horowitz horowity@checkpoint.com
Tue Sep 12 06:08:00 GMT 2006


Hello,

I search a way so I could operate the -Werror flag in gcc on linux, 

The motivation is to enforce regarding to warnings 
(if they stay just warnings we sometime ignore them).

My problem is that sometime there is specific warning that can't be resolve,
so I want to ignore it.

On Windows I have the way of 
#ifdef WIN32
#pragma warning (disable: #num of the warning) 
#endif
	.The code generates the warning.
#ifdef WIN32
#pragma warning (default: #num of the warning)
#endif

Did any body know similar way that can work on Linux?

(I know you are working on "#pragma diagnostic" that will be available in
the future, but I search a way to do it right now).

Thanks in advance

Yehezkel



More information about the Gcc-help mailing list