lua-users home
lua-l archive

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

On Tue, Jun 28, 2016 at 11:04 AM, Sean Conner <> wrote:
> It was thus said that the Great Roberto Ierusalimschy once stated:
>> > Wouldn't it be useful to use some macro magic to remove the cast
>> > when the code is built as plain C, so that the code the compiler
>> > sees is conforming both as C and as C++?
>> Currently, the code the compiler sees is already conforming both to C
>> and C++.  Why that macro would be useful?
>   As a C programmer, you do not need to cast to and from void*.  For me,
> that's enough.  But furthermore, NULL, from my understanding, is NOT valid
> C++ (Stroustrup hates NULL, so thus it is shunned)---either a plain 0 should
> be used, or nullptr.  Yet there's plenty of NULLs in the code.
>   So how is Lua compiled as C++ again?
>   -spc

The easiest would be CC=g++, I think.

/s/ Adam