[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [patch][c++] fix "invalid conversion from ‘void*’ to ‘char*’"
- From: Coda Highland <chighland@...>
- Date: Tue, 28 Jun 2016 11:07:33 -0700
On Tue, Jun 28, 2016 at 11:04 AM, Sean Conner <email@example.com> 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?
The easiest would be CC=g++, I think.