Closed vigneshvg closed 1 year ago
Thank you. Are you building to a 32 bits target?
Thank you. Are you building to a 32 bits target?
No. But i don't think the target matters.
The key type of itemRefs is uint32_t and sym.value is of type int64_t. So, it would cause a narrowing conversion error irrespective of the target.
clang14 and gcc12 on Linux don't raise this legit warning. I'm trying to find a way to better catch them in the future.
clang14 and gcc12 on Linux don't raise this legit warning. I'm trying to find a way to better catch them in the future.
that's weird, because this warning gets triggered on my linux machine with clang 14.0.6-2.
Weird:
$ clang -v
Debian clang version 14.0.6-2
Thanks anyway!
Without the cast, it results in the following compilation error: error: narrowing conversion of ‘(int64_t)sym.Symbol::value’ from ‘int64_t’ {aka ‘long int’} to ‘unsigned int’ [-Werror=narrowing]
This cast is similar to other ones in the file.