How to disable "warning: binary constants are a GCC extension" ?
I have active -Wextra -pedantic and want to disable above warning? How to do it without unintentionally disable some other warning?
Generally you can find out which switch controls which warning with the option
-fdiagnostics-show-option
But this warning says:
warning: binary constants are a GCC extension [enabled by default]
Being an extension means, it is enabled with -pedantic
Here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23479#c3 it has been discussed to add the warning to -Wgcc-extensions, but that switch doesn't exist.
From the manual at http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/C-Extensions.html#C-Extensions
GNU C provides several language features not found in ISO standard C. (The -pedantic option directs GCC to print a warning message if any of these features is used.) To test for the availability of these features in conditional compilation, check for a predefined macro GNUC, which is always defined under GCC.
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