lua-users home
lua-l archive

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


> I've compiled the latest lua54-alpha-rc1 on clang, clang reported 38
> warnings. Would be nice to double check just to be sure is not a source of
> problems. (also would be nice to have no warning on clang, since we have no
> warning on gcc and MSVC).

We had no warnings in clang; it depends on the version of clang you are
using :-)

Most of these warnings shows a problem in clang, not in Lua. A trivial
flow analysis would convince it that, where it claims "variable
'X' may be uninitialized", it can't. If I do the correction it
suggests, a compiler with a good flow analysis could complain that the
initialization value is never used. And a not-so-good compiler
would generate extra code to be executed for nothing. (If the compiler
is good enough to realize that the extra suggested '= 0.0' is dead
code, it should be equally able to realize that the variable cannot be
used uninitialized in the original code.)

I really don't know how to satisfy this clang.

-- Roberto