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

    <tr>
        <th>Summary</th>
        <td>
            Microsoft extension: Allowing forward declaration of emum w/ fixed underlying type to be defined w/o fixed underlying type
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            extension:microsoft
      </td>
    </tr>

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

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

<pre>
    Given the following code: https://godbolt.org/z/K64Kbfso3

```cpp
enum E : int;
enum E {};
```

clang rejects this code b/c the definition does not provide a fixed underlying type but MSVC and edg w/ `--microsoft` accept this as an extension. 

Combined with another MSVC extension this can lead to some rather puzzling code until you break it down far enough: https://godbolt.org/z/PKPGMr3jE

```cpp
enum E {EA}; 

namespace A {
 typedef enum E : int E; 
}

namespace A {
enum E {EB};


void f() {
 E e{EB};
}
}
```

Do we want to support this extension?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU92OmzgUfhpzczSRYxIIF1yQSejFaKRKK-29sQ_g1vgg2yTNPP0KSKZp1V2tZIFknZ_P348MwXQOsWT7I9ufEjnFnnwZetma70lD-lZ-MRd0EHuElqylq3EdKNLI0gr6GMfA0oqJmom6I92QjRvyHRP1BxP1W7Z7a9pAKePVfDK-HjWOjFfopgHOMA8yLrL0-HSXH1l-Wq8-u9YhykrXgcdvqGKA2JuwwIGGiVotODW2xployIEmDOAowujpYjSChNb8QA2T0-jtbX5MvI0IzRTh_a-_X0E6Dag7uDJRA8v4y8tglKdAbWQZB6kUjnFdKwNIB_gjoguG3AZWgK80NMahhquJPUhHsUe_Dv-sveOWDixKDZEg0IDg5VI7Th8f9sEzTC4aCzeaoPEov4OJoOnqoJUe0NHU9f9Hiq9vX7-8-_Tb-T-lyI_naiX-_hgnBwyjVAjVIgqvFr40tvCrfHB-NOWnf2t92vIk73IuZDS0TByYKB6LzoC_la6j1--vrjgRXBGu0sWFzGkcyd9l-iSdpXWiy1QXaSETLLd5mokiP-xF0pdcocp2XCpd5Fmz5WKLe9VkeGiLbKsxS0wpuNjzLT9wvs9Tsdm2ClXOi33Gi7QtCrbjOEhjN9Zehpn4xIQwYbkVgqcisbJBG5acCbF4mKVV68lFdJoJwcQrE-IJa_XTd0LM2fTlPPmlmbrAdtyaEMPPXdFEi-X7o-X50RVUj9y25K_Sa9CorPRyiQi1gMM0rIb_czgiQXOP1WxrJmr6c2UyeVv-5kQT-6nZKBqYqGe499_L6GmOMBP1wlNgor5TdSnFPwEAAP__mXdy-w">