JDK-8250269 : Replace ATTRIBUTE_ALIGNED with alignas
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-07-24
  • Updated: 2023-10-18
  • Resolved: 2023-08-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b12Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Description
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.

Comments
Changeset: ab86d23a Author: Julian Waters <jwaters@openjdk.org> Date: 2023-08-22 06:12:28 +0000 URL: https://git.openjdk.org/jdk/commit/ab86d23adfa968a180de67199119fc392e9695c2
22-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11431 Date: 2022-11-30 12:25:37 +0000
30-11-2022