--- a/uninit.c +++ b/uninit.c @@ -234,7 +234,14 @@ which we want*/ #endif /*Can_use__setfpucw*/ -#else /* !(mc68000||powerpc) */ +#elif defined(__riscv) +/* RISC-V does not generate traps on floating-point exceptions, +so it's not possible to enable them */ + fflush(stdout); + fprintf(stderr, "\nf2c's -trapuv option is not supported on RISC-V\n"); + exit(-1); + +#else /* !(mc68000||powerpc||riscv) */ #ifdef _FPU_IEEE #ifndef _FPU_EXTENDED /* e.g., ARM processor under Linux */