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

ATTRIBUTE_ALIGNED requires GNU extensions enabled

    XMLWordPrintable

Details

    • b13

    Backports

      Description

        The GCC version of the ATTRIBUTE_ALIGNED macro was recently changed to use a typeof form (JDK-8220283). Using typeof requires enabling GNU extensions, which we are doing via -std=gnu++98.

        For JEP 347 (JDK-8208089) we currently plan to use -std=c++14, not turning on GNU language extensions. That isn't compatible with this use of typeof. And this is the only build failure with that option. The fix is to use __typeof__ instead of typeof.

        Of course, once JEP 347 is integrated, the old GCC versions that need the typeof won't be supported anymore anyway. But during the interim period it would be nice to not need to worry about this.

        (We also need -std=gnu++98 currently because of va_copy. We get that for free with -std=c++14, since it's part of the C99 standard library.)

        Attachments

          Issue Links

            Activity

              People

                kbarrett Kim Barrett
                kbarrett Kim Barrett
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: