[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: compile lvm.c as cpp code fails at 'goto condjump'
- From: mkluwe@...
- Date: Mon, 29 Jan 2018 20:31:13 +0100
Hi!
2018-01-06 0:37 GMT+01:00 Paige DePol <lual@serfnet.org>:
> Paige DePol <lual@serfnet.org> wrote:
>
> > What I am confused about is why my Xcode doesn't give me an error?
> > Even
> > when I specifically tell it to compile in C++ mode, and especially
> > as it
> > is an error condition and not simply a warning!
>
> Well, I must have done something odd last time, or a cache didn't
> clear,
> because I tried to compile the GitHub version of Lua in C++ mode
> again
> and this time I do get the same error as the thread creator.
>
> Moving the goto logic down to the OP_TEST vmcase block does fix the
> error.
As `*rb` is not used after the `condjump` label, I "fixed" this by
enclosing `*rb` in a small scope to get C++ compatability:
vmcase(OP_EQ) {
{
TValue *rb = vRB(i);
Protect(cond = luaV_equalobj(L, vra, rb));
}
condjump:
Regards,
Matthias