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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] `no_unique_address` is reserved word in pre-C++20 dialects (non-conforming)
        </td>
    </tr>

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

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

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

<pre>
    As we can see on [this Godbolt link](https://godbolt.org/z/5W4EoEM4E), even when compiling in earlier dialects than C++20 (such as C++17), we get a compiler error since `no_unique_address` is effectively a reserved word even in pre-C++20 dialects.

Some context: Clang supports `[[no_unique_address]` in all dialects for C++11 and later (I don't know why it doesn't support it in C++03 mode, even as `__attribute__((no_unique_address))`).

Failing to support a double-underscored `no_unique_address` means that `no_unique_address` encroaches into the user's namespace in C++11 through C++17 dialects which is not good.

One resolution would be if Clang could start supporting a __dundered form of `no_unique_address` that would be safely usable by the implementor, e.g. `__attribute__((__no_unique_address__))`.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8lE-P8jYQxj-NcxmBHIeE5JDDsixVq1Y99NBj5NhD4r6Oh_rPpttPXyXwQrcregFpDOPn9zyekSGYwSG2rDyw8pjJFEfy7U-EP1NAn_WkP9qXADOCkg4CIpADVh7iaAL8QLonG8Ea942VRybqMcZLYMULEycmTsP1fEt-YOL0NxOn8vfdG739sntjomHiFfAdHcwjOlA0XYw1bgDjAKW3Bj1oIy2qGCCO0sErEwcmDoIDE3VIagQZvhfz_a3jjDBgBHlriB7Qe_IQjFMIrOKOuuTMnwk7qbXHEFjFwQTA8xlVNO9oP0CCx4D-HTXM5PVVpnFw8bh5qPiubsv4kfGX6-dvNCEochH_iqx4gVcr3QAhXS7kY1gErFYfvsooj6sSB9LaB_mZ_J0xB-k0WBnRLxb8CJocE_sI3xzNMI8fYCJownCt3i5diubuHi9gIo138-WqqetkjN70KWLXMVEzUX8VuBjcLACi-YR8ktfgIt2vlKAp9RY3yWn0QZFH_dT8CaVbI45Pf4JOeZJqxADGRYI4IqSAnol9ACcnDBep8F-YeQ5x9JSG8fFCHqbOo1HjErqjCAOR_sTzq8Mlf7IpGnIwU7IaegRzvqWp1kqI0t9NXvgldJ1egVEvuU1A56dEK-69dZDn5d2lIHuL0H-sgGa6WJzQRfJrXNth-ySrrvtyx3J0y-sGl-m20E3RyAzbvNrXvCyqvMrGtq5roVUl-6Jqqr7a8b2Qgu_rHW8qLHKZmVZwUfCCl0Jwnldb2fCai30vypzvm3PDdhwnaezW2vdpGffMhJCwrfK8qTIre7RhXTFCOJxhPWRCLBvHt8t_Nn0aAttxa0IMjy7RRLvuptV3Vh7_b4A_j-zTaYX1bbuNIrdkZNzARJMlb9v_LC8Tx9RvFU1MnBZFt6_NxdMfqCITp5UjMHFaOf8JAAD__-TOuX8">