Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: avoid clang masquerading as gcc in ManyConfigTests #671

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

carenas
Copy link
Contributor

@carenas carenas commented Jan 13, 2025

Avoid confusing clang (as a system compiler in macOS or other platforms) with gcc by ManyConfigTests.

Comment on lines 116 to 118
# 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 -`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work? That's annoying, sorry.

We should fix the comment above to remove "or Clang".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be broken also with Intel's (at least the legacy) compiler as well then.

__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.
@NWilson NWilson merged commit 81dced9 into PCRE2Project:master Jan 14, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants