lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
If in one's C code, SIGFPEs are enabled for invalid floating point operations (with fpsetmask(FP_X_INV) or feenableexcept(FE_INVALID) or
[...]
perhaps Lua needs to set those exceptions off when it begins parsing
and revert their state when it finishes parsing.

Lua uses C89 and so has no access to C99 floating point exception handling.
Perhaps you can disable exceptions before calling Lua.

lua_number2int (that triggers exceptions) is not C89, it is a macro calling assembler instructions. Temporary exception disabling (that the original poster suggests) can be accomplished via assembler either.

--
Shmuel