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

[clang] Accept -std=c++23/gnu++23 rather than c++2b, like gcc does #59300

Closed
Romain-Geissler-1A opened this issue Dec 2, 2022 · 7 comments
Closed
Labels
c++23 clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@Romain-Geissler-1A
Copy link
Member

Hi,

gcc already accepts the C++ dialects c++23/gnu++23, and checking right now on Compiler Explorer it seems clang does not. C++23 isn't finalized yet, however it is shaping up and has already reached the feature freeze phase. Most likely it will be officially formalized in 2023. Is it time to start accepting -std=c++23/-std=gnu++23 in clang ?

Cheers,
Romain

@tbaederr tbaederr added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed new issue labels Dec 2, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 2, 2022

@llvm/issue-subscribers-clang-frontend

@EugeneZelenko EugeneZelenko added clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' and removed clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Dec 2, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 2, 2022

@llvm/issue-subscribers-clang-driver

@AaronBallman AaronBallman added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature c++23 labels Dec 2, 2022
@AaronBallman
Copy link
Collaborator

We typically wait for the standard to be ratified before doing that, but at the end of the day, if the standard is ratified in 2024, we'd just accept c++23 as an alias for c++24 same as we do with c90/c89. Interestingly, GCC does not accept -std=c23 yet.

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 2, 2022

@llvm/issue-subscribers-c-2b

@Romain-Geissler-1A
Copy link
Member Author

Hi,

I am not sure this if this is ok to implement this now. Last time for C++20 it seems it was done in February 2020: 24ad121

@AaronBallman
Copy link
Collaborator

I think we're good to go for renaming C++2b to C++23 now (any ballot comments received by WG21 at this stage will be handled as issues against C++2c instead). CC @hubert-reinterpretcast as C++ conformance code owner

@Romain-Geissler-1A
Copy link
Member Author

This is implemented on the main branch now, so closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++23 clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

5 participants