lua-users home
lua-l archive

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

> It seems that I ran across a really weird compiler bug! Thanks
> for all your help!
> Unfortunately, this may mean that I'll have to change every in-
> equality test in every Lua source and header file :-(

I don't think the problem is with inequalities tests per se. A good compiler
can do several optimizations when the expressions involved in the (in)equality
are boolean expressions (comparisons, ands, ors, etc.). The more optimizations
it does, the bigger the chance for bugs. I guess only this instruction (and
the next, which is quite similar) needs to be changed. And, if it is to change,
my suggestion is not to change for equality (which could be buggy, too).
Instead, something like  (GETARG_C ? !isfalse : isfalse) would be easier
for the compiler...

-- Roberto