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

-Wexpansion-to-defined enabled without -pedantic #29271

Open
llvmbot opened this issue Aug 8, 2016 · 0 comments
Open

-Wexpansion-to-defined enabled without -pedantic #29271

llvmbot opened this issue Aug 8, 2016 · 0 comments
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 8, 2016

Bugzilla Link 28901
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

Macros that expand to "defined" are undefined behavior according to the C standard, but clang, as a language extension, is implementing it by always treating "defined" as the preprocessor operator.

While it is a good idea to add a separate warning flag for -Wexpansion-to-defined, it should only be enabled by default if -pedantic or perhaps -Wextra (and of course -Weverything) is provided. It should not be enabled by -Wall.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

1 participant