lua-users home
lua-l archive

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

On Sun, Feb 04, 2001 at 11:06:00PM +0000, Gavin Wraith wrote:
> Is this a bug in lua or in my C compiler (Gnu C)?
> Try
>    x = tonumber("FFFFFFFF",16)
>    print(x+1)
>    write(format("%d\n",x+1))
> For me it gives
>    4294967296
>    Uncaught trap: Floating point exception
> In my view it ought to truncate gracefully and give
>    4294967296
>    0
>  What does yours do? 

I'm wondering if it's a problem with RISC OS' FPE, because Lua
post-mortems when compiled with Norcroft/ARM CC, GCC or EasyC
when this is executed, but seems to function correctly when
compiled with GCC and run on a i386 Linux box.  If somebody wants
a nice stack backtrace from my RISC OS port, just ask.  It
might help...

Rob Kendrick -
Today is what happened to yesterday.