Skip to content

Commit

Permalink
maint: avoid clang masquerading as gcc in ManyConfigTests
Browse files Browse the repository at this point in the history
__GNUC__ is defined by any compiler that claims compliance to GNU
but that doesn't include the cmdline interface, so avoid passing
GCC specific warning flags to clang.
  • Loading branch information
carenas committed Jan 13, 2025
1 parent 03c0977 commit cad52d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maint/ManyConfigTests
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ISGCC=0

# If the compiler is GCC or Clang, add a lot of warning switches.

CC_VER_OUTPUT=`printf '#ifdef __GNUC__\nGCC=yes\n#endif\n' | $CC -E -`
CC_VER_OUTPUT=`printf '#if defined(__GNUC__) && !defined(__clang__)\nGCC=yes\n#endif\n' | $CC -E -`
if [ $? -eq 0 ] && (echo "$CC_VER_OUTPUT" | grep GCC=yes) >/dev/null; then
echo "Treating $CC as GCC"
ISGCC=1
Expand Down

0 comments on commit cad52d2

Please sign in to comment.