[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fossil build failure on riscv64



When fossil 2.25-2 is compiled with clang, it works fine!

$ debian/rules binary CC=clang CXX=clang++
$ ./fossil version
This is fossil version 2.25 [1fba3e4aa9] 2025-04-07 19:33:35 UTC
$ ./fossil test-th-eval "expr (1<<31)"
-2147483648

So the issue is in GCC. I will hotwire debian/rules to use clang on
riscv64, but it would probably make sense to alert the GCC
maintainers. Not sure how to cobble together a minimal program that
exhibits the problem though. We don't even know what's going on at the
low level. And, it might not be a bug: the C/C++ specs may give the
compiler license to burn down the house when it sees (1<<31) in a
signed 32-bit integer.


Reply to: