https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105499
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- __extension__ is supposed to disable compatibility warnings since they are written in GNU C. Just happens that you enabled compatibility warnings to C++ which are also disabled. This is the misunderstanding of what the warning and what __extension__ does.