[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Compiling a project with '-ansi'
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 31 Aug 2016 14:18:22 -0300
> In a project I'm writing I want to ensure my C code doesn't use
> newfangled features, so I compile it with `-ansi` (or `-std=c90`). I'm
> using gcc.
> However, in this mode the compiler emits an error:
Unfortunately, there is no way around this. The Lua C API uses lua_Integer and so lua_Integer in your code must be the same as lua_Integer in the installed Lua library.
I sympathize: Most of my Lua libraries are written in C90 but when Lua 5.3 came out I had to remove -ansi from the Makefiles and use -std=c99.