Closed KarlK90 closed 3 years ago
Hi @KarlK90 , thanks for your contribution, the riscv_flen
should not be defined when no FPU present as described here https://github.com/riscv/riscv-toolchain-conventions#cc-preprocessor-definitions, your PR is correct, I should check the riscv_flen
is defined first,then check value.
Thanks Huaqi
This guards the floating point defines in
riscv_bits.h
, because__riscv_flen
is undefined for archs that don't have them.I ran into trouble in a project that has
-Werror
and-Wundef
defined, defining__riscv_flen
as 0 has the side effect that a non existent csr is accessed in the startup code which results in a runtime exception.