When using the #warning
directive, rather than one warning I get two - the one I generate, plus an additional
warning: #warning is a GCC extension [enabled by default]
.
I can suppress the #warning directive's result itself, with -Wno-cpp
, but that's the opposite of what I want.
I can work around this by instead using #pragma message()
but that seems to render the #warning directive rather pointless - is there no way to suppress this warning warning?
Ah, it seems the -pedantic
option enables this warning, and there does not seem to be a specific override for it, as there is with most other GCC warnings. Removing -pedantic
gets rid of the warning about a warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With