-Wexpansion-to-defined enabled without -pedantic #29271
Labels
bugzilla
Issues migrated from bugzilla
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
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.
The text was updated successfully, but these errors were encountered: