Skip to content

Should #elifdef and #elifndef have a portability warning? #55306

@AaronBallman

Description

@AaronBallman

These are new features of C2x, but they're supported as a conforming extension in older versions of Clang. However, there's no pedantic warning given about them being a Clang extension in older language modes, so users may be surprised when porting to another compiler. See https://godbolt.org/z/MdK476q7b as an example. Should we be issuing a pedantic warning here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"good first issuehttps://github.com/llvm/llvm-project/contribute

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions