lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Sat, Feb 26, 2011 at 10:21 AM, Patrick Rapin <> wrote:
> src\ltm.h(49) : error C2133: 'luaT_typenames_' : unknown size
>This comes because when building Lua as an amalgamation, 'luaall_c' is
> defined, which leads to 'LUAI_DDEF' being defined as 'static'.
> And line 49 in ltm.h now reads out:
> static const char *const luaT_typenames_[];
> And it is illegal to declare a non-extern array of unspecified size.

I've seen this too.  It also occurs under "gcc -pedantic":

  ltm.h:49: error: array size missing in `luaT_typenames_'

Note that the other LUAI_DDEF's arrays (luaP_opmodes, luaP_opnames,
and luai_ctype_) declare their sizes explicitly.  You could do
likewise for luaT_typenames_.  However, this will still cause a
problem if you attempt to compile the amalgamation as C++ rather than
C.  The following is ok in C (tentative definition) but is an error
(redefinition, lacking extern) in C++:

  static char s[10];
  static char s[10];