[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [patch][c++] fix "invalid conversion from ‘void*’ to ‘char*’"
- From: Sean Conner <sean@...>
- Date: Tue, 28 Jun 2016 14:04:41 -0400
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