[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 22 09:49:49 PDT 2024
================
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages.
C++ Language Changes
--------------------
+C++17 Feature Support
+^^^^^^^^^^^^^^^^^^^^^
+- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE``
+ predefined macros to support standard library implementations of
+ ``std::hardware_destructive_interference_size`` and
+ ``std::hardware_constructive_interference_size``, respectively. These macros
+ are predefined in all C and C++ language modes. These macros can be
+ overridden on the command line with ``-D``, if desired. The values the macros
----------------
cor3ntin wrote:
> These macros can be overridden on the command line with ``-D``, if desired.
I would rather we don't say that at it could lead to ODR violations.
IE consider `alignas(std::hardware_destructive_interference_size()) struct S{};` with different values in different TUs
https://github.com/llvm/llvm-project/pull/89446
More information about the cfe-commits
mailing list