The following warning is seen with hotspot build on Mac.
$jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: warning: expression does not compute the number of elements in this array; element type is 'double', not 'relocInfo' [-Wsizeof-array-div]
buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
~~~~~~~~ ^
$jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2848:14: note: array 'locs_buf' declared here
double locs_buf[20];
^
$jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: note: place parentheses around the 'sizeof(relocInfo)' expression to silence this warning
buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
^
Compiling 1 files for java.se
$jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: warning: expression does not compute the number of elements in this array; element type is 'double', not 'relocInfo' [-Wsizeof-array-div]
buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
~~~~~~~~ ^
$jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2848:14: note: array 'locs_buf' declared here
double locs_buf[20];
^
$jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: note: place parentheses around the 'sizeof(relocInfo)' expression to silence this warning
buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
^
Compiling 1 files for java.se
- duplicates
-
JDK-8253375 OSX build fails with Xcode 12.0 (12A7209)
- Resolved
- relates to
-
JDK-8253311 Cleanup relocInfo constructors
- Resolved