Pelles C forum

Pelles C => Bug reports => Topic started by: mingodad on March 17, 2010, 12:01:41 PM

Title: Anonymous union or struct inside another struct is rejected
Post by: mingodad on March 17, 2010, 12:01:41 PM
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
};
Title: Re: Anonymous union or struct inside another struct is rejected
Post by: TimoVJL on March 17, 2010, 01:42:07 PM
Enable both Microsoft and PellesC extensions with -Ze -Zx options.

Title: Re: Anonymous union or struct inside another struct is rejected
Post by: mingodad on March 17, 2010, 07:15:40 PM
That worked, thanks a lot !