-
Bug
-
Resolution: Fixed
-
P4
-
16
-
b22
Build errors with clang were observed due to the use of __sync_add_and_fetch, which is legacy and will be deprecated in the future.
It can be reproduced by building macos-x86-zero or linux-x86-zero with clang.
------------------------------------------------------------------
/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:199:37: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'unsigned long'
return __sync_add_and_fetch(dest, add_value);
^~~~~~~~~
/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:170:12: note: in instantiation of function template specialization 'Atomic::PlatformAdd<8>::add_and_fetch<char *, unsigned long>' requested here
return add_and_fetch(dest, add_value, order) - add_value;
^
./src/hotspot/share/runtime/atomic.hpp:706:38: note: in instantiation of function template specialization 'Atomic::PlatformAdd<8>::fetch_and_add<char *, unsigned long>' requested here
return PlatformAdd<sizeof(P*)>().fetch_and_add(dest, scale_addend(addend), order);
^
... (rest of output omitted)
------------------------------------------------------------------
It can be reproduced by building macos-x86-zero or linux-x86-zero with clang.
------------------------------------------------------------------
/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:199:37: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'unsigned long'
return __sync_add_and_fetch(dest, add_value);
^~~~~~~~~
/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:170:12: note: in instantiation of function template specialization 'Atomic::PlatformAdd<8>::add_and_fetch<char *, unsigned long>' requested here
return add_and_fetch(dest, add_value, order) - add_value;
^
./src/hotspot/share/runtime/atomic.hpp:706:38: note: in instantiation of function template specialization 'Atomic::PlatformAdd<8>::fetch_and_add<char *, unsigned long>' requested here
return PlatformAdd<sizeof(P*)>().fetch_and_add(dest, scale_addend(addend), order);
^
... (rest of output omitted)
------------------------------------------------------------------
- relates to
-
JDK-8252221 Use multiple workers for Parallel GC pre-touching
-
- Resolved
-