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

(C, C++) Implement C2y and C++26 changes #4214

Open
Eisenwave opened this issue Feb 26, 2025 · 0 comments
Open

(C, C++) Implement C2y and C++26 changes #4214

Eisenwave opened this issue Feb 26, 2025 · 0 comments
Labels
bug help welcome Could use help from community language

Comments

@Eisenwave
Copy link
Contributor

Eisenwave commented Feb 26, 2025

Describe the issue
The grammars for C and C++ do not yet include the latest C2y and C++26 features.

Additional context
This list is quite likely incomplete, but here are some of the changes:

  • C++26 contracts (P2900) have been accepted (contextual keywords pre, post, and true keyword contract_assert)
  • #embed is in C++, and on track to be added to C2y (add keyword in preprocessor mode)
  • C++26 delete("reason") is possible, but delete is currently highlighted as a function name instead of a keyword in that situation
  • C2y is on track to add defer as a feature (add keyword)
  • C2y already supports break label and there are ongoing efforts to add this to C++; do we need dedicated label highlighting?

Additionally, the C23 type_BitInt is also provided as a C++ compiler extension by clang, and it might even become a proper keyword in C++ (though that remains to be seen). Anyhow, it should be a keyword even if it's non-standard.

See also https://en.cppreference.com/w/cpp/26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

No branches or pull requests

1 participant