[PATCH] D122874: [clang] Add GNU spelling for no_unqiue_address attribute

Nikolas Klauser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 7 06:09:08 PDT 2022


philnik added a comment.

> Hmmm, I'd be more comfortable if this wasn't an ABI break for people using the `__attribute__(())` spelling. If we wanted to surprise users with ABI breaks, we'd just implement `[[no_unique_address]]` on Windows and break users when Microsoft eventually supports the attribute, which is an approach I'm rather strongly opposed to. In this case, it's a bit different because it's a GNU-style spelling and Microsoft doesn't support that spelling at all, so my thinking was that we could define the ABI for it and make it stable because it's our extension. But I can see why you'd want something different in libc++.

I'm also OK with `__attribute__((no_unique_address))` being stable. We have all these fun things behind a macro anyways currently, so nothing would prevent us from having `__attribute__((no_unique_address))` in the stable ABI and use `[[no_unique_address]]` (whenever it will be implemented) in the unstable ABI. Or just remove the macro stuff if it will be the same ABI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122874/new/

https://reviews.llvm.org/D122874



More information about the cfe-commits mailing list