Using [[may_alias]] in C23/C++23 on a union works in neither post-"union" position, or at the end of the definition
Gavin Ray
ray.gavin97@gmail.com
Tue Dec 6 20:31:57 GMT 2022
Ah got it, didn't know that (handy, will save me duplicating a bunch of
attributes).
Thanks Jonathan!
On Tue, Dec 6, 2022 at 2:23 PM Jonathan Wakely <jwakely.gcc@gmail.com>
wrote:
>
>
> On Tue, 6 Dec 2022, 18:36 Gavin Ray via Gcc, <gcc@gcc.gnu.org> wrote:
>
>> Oh, D'oh! Thanks Joseph, apologies for the needless email on the list
>> then.
>>
>> One final question if I could -- does that mean that in order to support
>> "may-alias" with the bracket syntax on both Clang and GCC, it would
>> require:
>>
>> union [[gnu::may_alias]] [[clang::may_alias]] foo {};
>>
>
>
>
> Probably not. Clang accepts the gnu:: namespace for attributes that
> originated with GCC.
>
>
>
More information about the Gcc
mailing list