lua-users home
lua-l archive

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


> So I have created a file etc/luser_exception.h in which one can redefine
> the setjmp/longjmp mechanism, this file being included in ldo.c where
> the macro definitions default to the standard setjmp/longjmp mechanism.

Probably 5.1 will have these macros, to easy the task of using
exceptions (instead of longjmp) when compiling Lua with C++.


>  #if INT_MAX > 32767 /* ################# */
>  if (x >= 0x00010000) {

A smarter compiler could notice that an unsigned int cannot be larger
than 0x00010000, so the if condition is constant (and the `then' part
is dead code).


> I suppose that this is not important because even if data is lost when
> hashing pointers to ints, the tables will still work fine,

Correct.


> but maybe there is a possibility to silence that warning ?

Suggestions are welcome.

-- Roberto