GCC 12 will support #elifdef and #elifndef preprocessor directives
According to the latest submission records, GCC 12 will support the new #elifdef and #elifndef preprocessor directives. For a long time, there have been #ifdef, #else, #elif and similar instructions to control C/C++ conditional compilation, but there are no #elifdef or #elifndef instructions. Until earlier this year, at the last C language conference, the proposal for these two new directives was accepted, and C2x finally confirmed that it will support the #elifdef and #elifndef preprocessor directives. C2x is the next ISO standard of the C language and is expected to be completed in 2022.
To support these two new directives, preliminary work on #elifdef and #elifndef has been merged into GCC 12. However, these instructions currently only support c2x/gnu2x language targets and will be regarded as non-instructions in any other language versions. In addition, these instructions are also proposed for C++, and these instructions are implemented in libcpp accordingly. If this feature is accepted by C++, then these instructions can also be enabled in the relevant C++ version.