lua-users home
lua-l archive

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

In ltable.c (Lua 5.0.2), beginning at line 492 (in luaH_set):


    else if (ttisnumber(key) && nvalue(key) != nvalue(key))

      luaG_runerror(L, "table index is NaN");


My compiler warns that this _expression_ is always false. It sure looks that way to me. The updated code in 5.1.1 still looks to me like it winds up doing the same thing (after several layers of macro expansion). If I turn on optimization, I’m sure this code will be eliminated.


So, can anybody weigh in on this? Is this a bug? If not, why not?




No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.15.25/593 - Release Date: 12/19/2006 1:17 PM