-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
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 keywordcontract_assert) #embedis in C++, and on track to be added to C2y (add keyword in preprocessor mode)- C++26
delete("reason")is possible, butdeleteis currently highlighted as a function name instead of a keyword in that situation - C2y is on track to add
deferas a feature (add keyword) - C2y already supports
break labeland 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