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

    <tr>
        <th>Summary</th>
        <td>
            C23 structure and union compatibility should allow for compatible members
        </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>
    It seems like Clang is working to support C23 new tag compatibility rules, however there are some issues currently. Here is one of them:
```c
struct A{int h;};
int main(){
    extern struct A x;
 enum E:int{e};
    struct A{enum E h;};
    extern struct A x;
}
```
Clang rejects this code because it considers the two structure types to be incompatible. They should be compatible because int and enum E are compatible, exact type equivalence is not required by the standard. The resulting composite type for x should have h as the composite type of int and enum E.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8U8tu6zgM_Rp5QzRQ5Fez8CJpJ-js5wdki441laWMSOXx9wPZ6U1vFxc2bICPQ_KQRxPZk0fsRH0Q9XuhE08hdh_a5Sfd9aitK4s-mHv3NwMhzgTOfiK8Oe1PYAmuIX5afwIOQOl8DpHhTZXg8QqsTzCE-azZ9tZZvkNMDkmoN5jCFS8YgSeMCDoiUJgRLFFCgiHFiJ7dfQMf2W8JgkcIY46fRbkXci8aub6DkHvimAaGvWgP1jNMojyI9j1_5T4bZm29UK9C7USbbQAAeGOMHr5S4baGA_o0w1-izImiPeAvoJz0rdAa93utP-DmmG9dC7lfKYz4Lw5MwJMlGIJB6HHQiRAswxA8WYMxuxH4Gh6wKSLw_YyUae8RrP_i2eEG_pnwDjSF5Ex2Pl1PaM-gvXnMuvD_jMr7wZseeCkB-F-yF-3QD8sifGCI2RbRQH9fGiPW3uholtIQkZLjfBMZM5DltVkYQ4TbV2OTviBMoNfRfkSG8UeLm8J0pdmVO11gt23rctu0spHF1O3GV1ntFOpGyto041i-bvVYjcb0LVamKmynpKplq5Rs6q2Umy0Ow1DXumrLqu-bRlQSZ23dxrnLvAnxVCxn2G2r3a6pC6d7dLQoRKl81otXKJUFE7uc9NKnE4lKOktMTxi27LDLanhuLY-UvA3-hzIerGjnwnUh6tvWZpx7jFSk6LqJ-UxZAeoo1PFkeUr9ZgizUMdc9_F7OceQz0qo4yopoY6PcS6d-j8AAP__B7lSGQ">