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

Atomic operations on scoped enums don't build with clang

XMLWordPrintable

    • b12

        Clang's __atomic intrinsics don't support scoped enums. As a result, attempting to use HotSpot's Atomic operations on macosx-aarch64 (which uses those intrinsics) will fail to compile, with an error like this:

        error: address argument to atomic operation must be a pointer to integer or pointer ('volatile AtomicEnumTestScoped *' invalid)

        Unscoped enums do work, else we'd have noticed a long time ago. Other platforms don't seem to have this problem. It's a little disappointing that clang's __atomic intrinsics differ from gcc's in this respect, but oh well.

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

                Created:
                Updated:
                Resolved: