Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8250269

Replace ATTRIBUTE_ALIGNED with alignas

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 16
    • hotspot
    • b12

      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.

            jwaters Julian Waters
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: