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

    <tr>
        <th>Summary</th>
        <td>
            Enhancement: diagnose declaration or definition of reserved identifiers
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    This code:
```
void __x(void);
```
compiled with:
```
-std=c11 -pedantic -Wall -Wextra
```
leads to:
```
<nothing>
```
instead of:
```
warning: declaration of reserved identifier `__x`
```
Per C11, 7.1.3 Reserved identifiers, 2:
> If the program declares or defines an identifier in a context in which it is reserved (other than as allowed by 7.1.4), or defines a reserved identifier as a macro name, the **behavior is undefined**.

Hence, the enhancement is: diagnose declaration or definition of reserved identifiers (all possible cases, see C11, 7.1.3 Reserved identifiers) to avoid undefined behavior.

@AaronBallman Any comments / ideas / thoughts?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylU01v2zAM_TXyRYhhS7ETH3xIv7DdhmHAjgUtM7YGWQokOWn__Sg3bVosHQYMEGQKFB_fe5Q71z-3P0YduHI9MrljxR0rdqwuzms5Hp3u-ePjExPbFDLRMHlz9aZy00Eb7PlJx_EzuFWIPZN3qiz56oA92KgVX_0EY2jHp-jhaplB6AOP7jNYJm-ti6O2A5P3V29oGyKBcLf_DOME3i4AO96jMuAhamepgHsM6I-kTPdIhPcaPaey5MobgY9Y3-jGbVkyccs3eZlL_v1PiJCy4sJG3vOvex5H5AfvBg_TmQYG7jzFe20pBPuehbYcaHw2knXpcBq1GrmmOFxY0-jIG7odR6oGwjDGnSjRPS_s1mmoxOV9l6uaUymfQHnHLUyYahJdJna0OhzhqAmDWs_2Bah_SeVnhcv-Ba16K0VLlBRO1ILqFus1DNYF_DiDMzP9l4mEpDO9o4MLQXcGuYKAi8kB8V-m0dAD47A8-DcB_FXWBw1sXezAO3tD_SbydGefaQpTkpFoPCRceIni6OZhjKTtIcO2rGu53VS12GR9K_tGNpBFHQ229xcn_s-GbPamHWM8JDuJAa2Bfsi5y4khHYw5vn5W9NB-oYp01CHMyayHatOUMhvbdbHuYYPQKSGLQkABRdPtKyHrZgtVU2QGOjShZdUNq-4y3YpCiKIRomzWhdjkcosbVXd7gaKuKqXIMpxAmzw1zp0fMt8uHLp5CJQ0OsRwSQLNcLCIr_gwk5G-PUzOE72FbbtQ_Q18sXzb">