News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

how to disable "warning: ignoring #pragma warning"

Started by lirong, July 20, 2007, 05:53:59 AM

Previous topic - Next topic

lirong

Hi,
I got a lot of this warning: ignoring #pragma warning.  "#pragma warning" is only used when compiled with msvc.  How can I disable that annoying warning when compile with gcc?

TIA

rickg22

Lol!  :P That was soooooooooooooo ironic.

A warning telling you that warnings can't be disabled. Please, let me laugh for a moment  :lol:

OK. The answer is simple, just comment the pragma.
Or you could put the pragma inside an #ifndef __GNUC__ .

lirong

Thank you for your reply.  I was looking some kind of compiler flag to disable it globally.  I don't want to add a lot of "#ifndef __GNUC__" in a lot of places.

Biplab

Be a part of the solution, not a part of the problem.