Anonymous union or struct inside another struct is rejected

Started by mingodad, March 17, 2010, 12:01:41 PM

Previous topic - Next topic

mingodad

I'm trying to compile the dao scripting language http://daovm.net/ and I'm getting errors with anoymous unions and structures inside another structure, the code compiles fine with gcc.

A pellesc project is attached, also if I define WIN32 it complains about __int64.

union DQuadUByte { void *p; struct  { unsigned char a, b, c, d; }; }; //<-- ??????????????????????????? Here pellesc asks for a name

struct DaoAbsType
{
   DAO_DATA_COMMON

   short         tid; /* type id */
   uchar_t       attrib;
   uchar_t       ffitype; /* for DaoCLoader module */
   DString      *name; /* type name */
   DString      *fname; /* field name, or parameter name */
   DArray       *nested;
   DMap         *mapNames;
   DaoTypeBase  *typer; /* TYPER of the represented type: built-in or C types */
   union {
      DaoBase    *extra;
      DaoClass   *klass;
      DaoCData   *cdata;
      DaoAbsType *abtype;
   };  <-??????????????????????????? Here pellesc asks for a name
};

TimoVJL

Enable both Microsoft and PellesC extensions with -Ze -Zx options.

May the source be with you