-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
P4
-
Affects Version/s: 27
-
Component/s: hotspot
-
linux
When using Clang to build the JDK on Linux, the following error is emitted (note that this is downgraded to a warning here as I specified --disable-warnings-as-errors):
In file included from
src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp:25:
In file included from
src/hotspot/os/linux/cgroupUtil_linux.hpp:29:
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:191:17: warning: implicit conversion from 'const uint64_t' (aka 'const unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
191 | _metric = value_unlimited;
| ~ ^~~~~~~~~~~~~~~
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:218:28: note: in instantiation of member function 'CachedMetric<double>::CachedMetric' requested here
218 | _metrics_cache = new CachedMetric<MetricType>();
| ^
src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp:332:14: note: in instantiation of member function 'CachingCgroupController<CgroupCpuController, double>::CachingCgroupController' requested here
332 | _cpu = new CachingCgroupController<CgroupCpuController, double>(cpu);
| ^
1 warning generated.
In file included from
src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:26:
In file included from
src/hotspot/os/linux/cgroupUtil_linux.hpp:29:
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:191:17: warning: implicit conversion from 'const uint64_t' (aka 'const unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
191 | _metric = value_unlimited;
| ~ ^~~~~~~~~~~~~~~
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:218:28: note: in instantiation of member function 'CachedMetric<double>::CachedMetric' requested here
218 | _metrics_cache = new CachedMetric<MetricType>();
| ^
src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:160:14: note: in instantiation of member function 'CachingCgroupController<CgroupCpuController, double>::CachingCgroupController' requested here
160 | _cpu = new CachingCgroupController<CgroupCpuController, double>(cpu);
| ^
1 warning generated.
In file included from
src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp:25:
In file included from
src/hotspot/os/linux/cgroupUtil_linux.hpp:29:
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:191:17: warning: implicit conversion from 'const uint64_t' (aka 'const unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
191 | _metric = value_unlimited;
| ~ ^~~~~~~~~~~~~~~
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:218:28: note: in instantiation of member function 'CachedMetric<double>::CachedMetric' requested here
218 | _metrics_cache = new CachedMetric<MetricType>();
| ^
src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp:332:14: note: in instantiation of member function 'CachingCgroupController<CgroupCpuController, double>::CachingCgroupController' requested here
332 | _cpu = new CachingCgroupController<CgroupCpuController, double>(cpu);
| ^
1 warning generated.
In file included from
src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:26:
In file included from
src/hotspot/os/linux/cgroupUtil_linux.hpp:29:
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:191:17: warning: implicit conversion from 'const uint64_t' (aka 'const unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
191 | _metric = value_unlimited;
| ~ ^~~~~~~~~~~~~~~
src/hotspot/os/linux/cgroupSubsystem_linux.hpp:218:28: note: in instantiation of member function 'CachedMetric<double>::CachedMetric' requested here
218 | _metrics_cache = new CachedMetric<MetricType>();
| ^
src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:160:14: note: in instantiation of member function 'CachingCgroupController<CgroupCpuController, double>::CachingCgroupController' requested here
160 | _cpu = new CachingCgroupController<CgroupCpuController, double>(cpu);
| ^
1 warning generated.
- duplicates
-
JDK-8375668 Compiler warning implicit-const-int-float-conversion by clang23
-
- Resolved
-