Skip to content

Clang exposes C interfaces in C++ mode that it shouldn't #87668

Open
@AaronBallman

Description

@AaronBallman

The C++ standard library is based on a particular revision of the C standard (e.g., C++23 is based on C17, C++17 is based on C11, C++14 is based on C99). The compiler provides some of the C standard library headers, but it exposes non-conforming interfaces from them in some language modes. For example:

https://godbolt.org/z/G8W7Gs1vE
https://godbolt.org/z/vbjs787TT
https://godbolt.org/z/Ks67KEoh3

For improved conformance, we should do a comprehensive review of the C standard library headers provided by Clang to ensure that we're exposing the proper interfaces in the proper language modes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++clang:headersHeaders provided by Clang, e.g. for intrinsicsconfirmedVerified by a second party

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions