C++11 added the alignas attribute, with behavior similar to that of gcc's __attribute__((aligned(x))) or Visual Studio's __declspec(align(x)).
We can phase out the use of the macro in favor of the standard attribute. In the meantime, we can replace the toolchain specific definitions of ATTRIBUTE_ALIGNED with a portable definition, perhaps to use alignas itself. We might deprecate the use of the macro, but changing its implementation quickly and cleanly applies the feature where the macro is being used.
This will require adding the alignas attribute to the list of language features approved for use in HotSpot code.
We can phase out the use of the macro in favor of the standard attribute. In the meantime, we can replace the toolchain specific definitions of ATTRIBUTE_ALIGNED with a portable definition, perhaps to use alignas itself. We might deprecate the use of the macro, but changing its implementation quickly and cleanly applies the feature where the macro is being used.
This will require adding the alignas attribute to the list of language features approved for use in HotSpot code.
- is blocked by
-
JDK-8252584 HotSpot Style Guide should permit alignas
- Resolved
- relates to
-
JDK-8316395 GCC 8 fails with "requested alignment 16 is larger than 8" after JDK-8250269
- Closed
-
JDK-8248682 AArch64: Use ATTRIBUTE_ALIGNED helper
- Resolved
-
JDK-8318481 linux-arm32 attribute warning for offset_of
- Closed
-
JDK-8208089 JEP 347: Enable C++14 Language Features
- Closed
(2 links to)