fix: keep g++ attributes to g++ only

prevent wannabe compilers from parsing GNUC-only code
(clang++ apparently defines __GNUC__)