https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105499
--- Comment #5 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> --- (In reply to Andrew Pinski from comment #4) > __extension__ disables all compatibility warnings. > > This is by design really as headers sometimes needs to be written using C > code and need to turn off these warnings. I don't understand why. If the code is designed only for C (i.e. it will not work with a C++ compiler), then the C++ compatibility option is not needed to test the code. Otherwise, the code is buggy, so the compatibility warning is useful.