-
Enhancement
-
Resolution: Fixed
-
P4
-
20
-
b12
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8321803 | 17.0.11 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
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.
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.
- backported by
-
JDK-8321803 Atomic operations on scoped enums don't build with clang
-
- Resolved
-