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

    <tr>
        <th>Summary</th>
        <td>
            Clang accepts typed enums language extension with -std=c99
        </td>
    </tr>

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

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

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

<pre>
    Hi all,

typed enums are not supported by C99 and any later C standard. It is supported by clang as a language extension of C.

See https://godbolt.org/z/4W1dMc53e as an example.

In my opinion, clang should only support typed enums in C if compiling with e.g. -std=gnu99 and not with -std=c99.

Furthermore, the documentation at https://clang.llvm.org/docs/LanguageExtensions.html#introduction is lacking information that typed enums are supported by clang in C. It is only noted that typed enums are supported for ObjectC.

Btw. GCC is not supporting typed enums in C.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFUktv2zAM_jX2hajhR-LHwYfWXbcCG3bYYWdZYmxtsmRI9LLs14920rUJCgywrAcl8nuwd-rUftIgjInyLkofo_T-_KfTjArQLlMA4RGsIwjLPDtPfN6foGsaEFbxOIERhB46CMQnwqsEngl0uH4gjbADCE4H62oRAwL-JrRBOwvuAF3yFsA3RBiJ5hAV91H-xN_gVO8MJc4PvPvDY_c9U1_kvsAtreV0YpoNXuV5tjCdwM3achkmecERRrcYBc6a0wtMeMtZW-ajDyDdNGuj-cVR0wiYDAncBVJR8TjY5aLBKs4WvkRk01xheFo8jegn53FFwGtQTi4TWhK0shd0w3UDmRjza7rQ5fuBp88X5T68CBeSkSY2r9CWvFOL3PKx9kbInytsbQ_OT-cyNIprlquz75i0kn_xcFOICXL8P8-5Dnztf6Ckaycf6JjAx65bs71poxXcreJJjG1WlkVZZkVex6otVFM0IiZNBtvu3EFS4kzh6u07DXXjR7x40970E99Y-oQd5s0q9WW6m71bWfBWh7Dgqvu-qosyHtusr1RWppXI-aSu07w-YCoPclfUddaXWWxEjya00f4hynOLR9hS8DraP8a6zdM8T5s8Teu03tVJXqd7gUJUlWqqPcpol-IktPnnfOzbDVK_DIGDRgcKr0ERgh4s4laO84uFRufbQF5PrqjqeCvebuD_AgfbTbE">