Compilation failure of 5.4 work with TinyC

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation failure of 5.4 work with TinyC

Tony Papadimitriou
I’ve been compiling all versions of Lua with TinyC.
 
With 5.4 (both 1 and 2) I get the following:
 
In file included from src/one.c:68:
In file included from src/lapi.c:19:
In file included from src/lapi.h:12:
In file included from src/lstate.h:13:
src/ltm.h:61: error: ')' expected (got "char")
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Compilation failure of 5.4 work with TinyC

Albert Chan

On Jul 7, 2018, at 7:56 AM, Tony Papadimitriou <[hidden email]> wrote:

I’ve been compiling all versions of Lua with TinyC.
 
With 5.4 (both 1 and 2) I get the following:
 
In file included from src/one.c:68:
In file included from src/lapi.c:19:
In file included from src/lapi.h:12:
In file included from src/lstate.h:13:
src/ltm.h:61: error: ')' expected (got "char")
 

I think it is the misplaced ";" in src/ltm.h:61 *before* ")"
Reply | Threaded
Open this post in threaded view
|

Re: Compilation failure of 5.4 work with TinyC

Roberto Ierusalimschy
> > I’ve been compiling all versions of Lua with TinyC.
> >  
> > With 5.4 (both 1 and 2) I get the following:
> >  
> > In file included from src/one.c:68:
> > In file included from src/lapi.c:19:
> > In file included from src/lapi.h:12:
> > In file included from src/lstate.h:13:
> > src/ltm.h:61: error: ')' expected (got "char")
> >  
>
> I think it is the misplaced ";" in src/ltm.h:61 *before* ")"

Note that the macro LUAI_DDEC changed in 5.4 w2. Now it get the whole
declaration as an argument, so the ";" inside the parentheses. This
change is to allow the removal of the whole declaration in onelua.c.
(A 'static' variable in C cannot have a forward declaration before its
definition.) Therefore, onelua.c has to change accordingly.

However, this change would not explain the problems with 5.4 w1.

-- Roberto