[PATCH] D148700: [clang] Add support for “regular” keyword attributes
James Y Knight via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 16:01:31 PDT 2023
jyknight added a comment.
> This makes ``CXX11`` and ``C2x`` spellings
> unsuitable for attributes that affect the type system, that change the
> binary interface of the code, or that have other similar semantic meaning.
Yes, standard attributes aren't supposed to be used for things which affect the type system (although, we certainly have many, already, which do, since we expose most GCC-syntax attributes also as C++-standard attribute syntax!)
But I think the C++ standard `[[no_unique_address]]` attribute is ample precedent that standard-attributes may validly affect ABI. `[[no_unique_address]]` may indeed be ignored without changing the validity of a program -- but it does change the ABI. So, if you care for ABI compatibility between compilers, all the compilers you're using need to agree on whether they ignore it or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148700/new/
https://reviews.llvm.org/D148700
More information about the cfe-commits
mailing list