lua-users home
lua-l archive

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

> The literal 0 (and NULL, which is defined to be 0) is explicitly
> comparable and assignable to a pointer, even in C++ (, so I
> don't think its correct to say 0 is of type int.
> Unlike 0, the result of a comma expression has a type, int in this
> case, and int cannot be assigned to a pointer in C++, or without
> warnings in C (, not sure if its a bug.  Of course,
> is plainly not legal.

That makes sense. What surprised me is that the construction does not
generate even a warning in C.

Many thanks for all answers.

-- Roberto