<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/84601>84601</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            #elifdef and #elifndef shouldn't have meaning prior to C23 in standards conformance mode
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Halalaluyafail3
      </td>
    </tr>
</table>

<pre>
    Prior to C23 there was no `#elifdef` or `#elifndef` directive, so they should be ignored like they were part of a skipped group in conditional inclusion. For example:
```c
#define X
#if 0
a
#elifdef X
b
#endif
```
The `#elifdef X` should be ignored here, similar to how any other directive would be ignored. Standards conformance modes such as `-std=c11` should avoid changing the behavior of strictly conforming programs, so I would expect this to expand to nothing. GCC will do this correctly (https://godbolt.org/z/476norbon), but Clang issues a warning and interprets the directive as it would in C23 mode (https://godbolt.org/z/vxs86781s). In `-std=gnu11` mode the extension is allowable since it doesn't have the same requirements on extensions (GCC does the same thing as Clang here, without the diagnostic).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMlM-O4zYMxp9GuRAT2HLGGR982GaQdm8F2sNeaYu22ZVFV5Lzp09fyPZs0ikKFAmQSJbI7_uRJobAvSOq1etP6vV9h3McxNe_oE2f-Y4dsi12jZh7_atn8RAFTrqAOJAnuGIAJ6DKTOmCLHeGOlVmIP5pz22bhj21kS-k9AmCpBB3CIPM1kBDwL0TTwYsf6f12TWlmNBHkA4QwneeJjLQe5knYAetOMORxaEFdq2dA4vbw1k80A3HyZIqvqjsXWVfkprl225rXRjq2BF8-7HBHWTrAn_sbZ4-TjWPB85w9yn2uvx9oH8CgW_J_b-NJoILCh7Z4kJ2kCugu4MkvA9gcP10dw-_RXQGvQmJQid-RNcSjGIoQJjbATAkFS8hGlW8t3n-pAEvwgbaAV3Prk-soaEBL6m80kGIntto7x-R05nJS-9xDFvpvm6K6DZRGyEOHJJ8uk3oTPrnJA7s-j38fDrBla0FI-uxVnxyZe-g9NsQ4xRSkfRZ6XMvphEb9-J7pc9_KX0-HEsnvhGndJVSN3OEk0XXA4cwUwCEK3qXFKbE7CL5yVMMi6kHPwzAcdPMbmnghOr_SLjcwlt5fMuD0tUevronqr2bV65LrJSRbpFc6kLgAGitXLGxBIFTcTiCEQpO6WOEAS_rlYAjgac_Z_Y0kosBxD3ihCQxMUw3H-cXuMnVCuOjk64cB5njZh57JyFym4TvTF2YqqhwR3V-zKrqtcryfDfUxQENHY9VVhZ51eojZll1yBqNXXF8a3S341pn-pAVWZUdivI13-dFWXbHoiqLyuQlaXXIaES2e2svYwK3W2pTvx3KLN9ZbMiGZbxo7ei6Fk5pnaaNr9Odl2bugzpklkMMjyiRo6X66TVKFX4aKVs3P-EcCd3arE-Dih2E_3xXdrO39acO4DjMzb6VUelzErP9vExe_qA2Kn1ee0_p82Lx7wAAAP__lgq7Tg">