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

    <tr>
        <th>Summary</th>
        <td>
            GNU attributes preceding standard attributes are rejected
        </td>
    </tr>

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

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

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

<pre>
    The following exemplifies the problem:

```
__attribute__((__visibility__("default"))) [[nodiscard]] int f();
[[nodiscard]] __attribute__((__visibility__("default"))) int f();
```

While GCC accepts both, clang will refuse the first one.

This is currently "expected" behaviour: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Parse/Parser.h#L2774-L2778


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylUk1v2zAM_TX2Rahhy7EdHXRYE6yXYdihw46GPuiYhWIZkpw2_36Mm2wZ0Esx4IEfok3yPUl7e5bPI7DBO-dfcToweIPj7HBAiCxRZQ5eOzhm9Zes3GflzbblFWva9yqlgHpJ0PcZ3xL6_oQRNTpM5-sZtzCoxSWKMi7ewbLmkTB5i9GoYLNmT2A4JTasP4msfrzO_PDL_xj94ZB_ib3bXyM6YE-7HVPGwJwi0z6NGd8x4xRp9orOsQDDEmHVbMAQE_MTFPddnkeMjGCWEGBK7sxoG3ibwSSwFDINozqhXwKJzcaU5nhRnX8lHDCNiy6MP1Li3OnmHuh6XqgBpdp5Te6ocCK3LkYeJ-MWC3cnP1SIcPOhIBr1N951m4eL3d4vnIOs2rapmrYWIreytqIWKk-YHMin7z_ZH-UjPRMwYC8PKCY1Wbqf-6oKQPq8rEzzJTj5aXYY4wKRgmbLuchHWVnRVkJshg5saZSBbjsMpehMPVQVV13ulAYX5fpq9jlKXnJelWVXNZz4FApas4WmrTaVUc2wyTYlkHauuAwufDjkQa476OUQqegwpvi3qGLEwwRw66-WNPogicI8QbD5uq9cl_0NoGsOmg">