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
Support #elifdef and #elifndef in c.vim #13679
base: master
Are you sure you want to change the base?
Conversation
C2x and C++23 add these new preprocessor conditionals, as shorter forms of #elif defined and #elif !defined. Fixes vim#13667
This is the minimal change to make vim recognize them, so that syntax highlighting works, and you can jump between them using |
Another way to define that regex would be:
Since each of |
We were waiting for C23 to be released before including those changes. As these directives are already supported by GCC I think they should be conditionally included if the "c_gnu" flag is set.
|
I don't think waiting makes sense. Both C2x and C++23 have been approved and are just awaiting publication now. The content is final, and these new preprocessor tokens have 0% chance of being removed. And it's not a GCC extension. GCC, Clang and Intel icx all support it in their latest production releases: |
OK, I'll try to do that too ... |
OK, if it's locked down I guess there's no reason not to add it now. There's a few other C23 related changes queued as PRs and similar that I'll try and round up soon. I gather you noticed there's a series of version flags and we'll need a new one, |
please ping me, once this is ready. |
C2x and C++23 add these new preprocessor conditionals, as shorter forms of
#elif defined
and#elif !defined
.Fixes #13667