https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is most likely because _GNU_SOURCE is defined when compiling with C++ code in GNU C++ mode.