KhronosGroup / KhronosGroup/SYCL-CTS
group functions warning: implicit conversion from 'unsigned long long' to 'float' changes value from 18446744073709551615 to 18446744073709551616
- Dominant language
- C++
- Stars
- 75
- Forks
- 96
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 4
Description
https://github.com/KhronosGroup/SYCL-CTS/blob/9691bc093d4d5b8965be68bfb0716e20fda6205b/tests/group_functions/group_scan.h#L60-L77
Build log:
```
[1154/1195] Building CXX object tests/group_functions/CMakeFiles/test_group_functions_objects.dir/group_joint_scan_unsigned_short.cpp.o
In file included from tests/group_functions/group_joint_scan_unsigned_short.cpp:29:
../tests/group_functions/group_scan.h:71:19: warning: implicit conversion from 'unsigned long long' to 'float' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
71 | if (tmp > std::numeric_limits::max()) {
| ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../tests/group_functions/group_scan.h:145:37: note: in instantiation of member function 'JointScanDataStruct>::JointScanDataStruct' requested here
145 | JointScanDataStruct host_data{size, op, with_init};
| ^
../tests/group_functions/group_scan.h:281:9: note: in instantiation of function template specialization 'check_scan<3, unsigned short, unsigned long long, float, std::multiplies>' requested here
281 | check_scan(queue, size, executionRange, OperatorT(),
| ^
../tests/group_functions/type_coverage.h:505:3: note: in instantiation of member function 'init_joint_scan_group, unsigned short, unsigned long long, float, std::multiplies>::operator()' reques
ted here
505 | Action{}(std::forward(head),
| ^
../tests/group_functions/type_coverage.h:522:5: note: in instantiation of function template specialization 'for_all_combinations, unsigned short, unsigned long long, float, std:
:multiplies, sycl::queue &, const std::basic_string &, true>' requested here
522 | ((for_all_combinations(
| ^
../tests/group_functions/group_scan.h:293:5: note: in instantiation of function template specialization 'for_all_combinations, unsigned short, unsigned long long, float, std::pl
us, std::multiplies, sycl::logical_and, sycl::logical_or, sycl::minimum, sycl::maximum, sycl::queue &>' requested here
293 | for_all_combinations(operators,
| ^
../tests/group_functions/type_coverage.h:505:3: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
505 | Action{}(std::forward(head),
| ^
../tests/group_functions/type_coverage.h:553:5: note: in instantiation of function template specialization 'for_all_combinations, unsigned short, unsigned long long, floa
t, sycl::queue &, true>' requested here
553 | ((for_all_combinations(
| ^
```
Other affected data types:
```
../tests/group_functions/group_scan.h:71:19: warning: implicit conversion from 'long long' to 'float' changes value from 9223372036854775807 to 9223372036854775808
../tests/group_functions/group_scan.h:71:19: warning: implicit conversion from 'unsigned long' to 'float' changes value from 18446744073709551615 to 18446744073709551616
../tests/group_functions/group_scan.h:71:19: warning: implicit conversion from 'long' to 'float' changes value from 9223372036854775807 to 9223372036854775808
../tests/group_functions/group_scan.h:71:19: warning: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296
../tests/group_functions/group_scan.h:71:19: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648
```
Contributor guide
Research direction
Inspect tests/group_functions/group_scan.h, especially lines 60-77 and the comparison at line 71, then reproduce the warning by building the affected group-functions target. Check the listed signed and unsigned type instantiations in the build log; done means those implicit-conversion warnings no longer appear in the build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100