Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Using Code::Blocks
»
how to disable "warning: ignoring #pragma warning"
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: how to disable "warning: ignoring #pragma warning" (Read 23084 times)
lirong
Guest
how to disable "warning: ignoring #pragma warning"
«
on:
July 20, 2007, 05:53:59 am »
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
Logged
rickg22
Lives here!
Posts: 2283
Re: how to disable "warning: ignoring #pragma warning"
«
Reply #1 on:
July 20, 2007, 06:08:10 am »
Lol!
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__ .
Logged
lirong
Guest
Re: how to disable "warning: ignoring #pragma warning"
«
Reply #2 on:
July 20, 2007, 06:31:04 am »
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.
Logged
Biplab
Developer
Lives here!
Posts: 1874
Re: how to disable "warning: ignoring #pragma warning"
«
Reply #3 on:
July 20, 2007, 06:54:39 am »
Add
-Wno-unknown-pragmas
to compiler options.
Logged
Be a part of the solution, not a part of the problem.
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Using Code::Blocks
»
how to disable "warning: ignoring #pragma warning"