This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Please support coo.h
- From: yuanbin <yuanbin0 at gmail dot com>
- To: gcc at gnu dot org
- Date: Thu, 10 Jun 2010 20:59:17 +0800
- Subject: Re: Please support coo.h
----------------------------------
initialization of the union:
union {
int i;
float f;
} t={1.5}; //t.f
because of EXTENDS2 in coo.h, compiler needs
to initialze last member of union.
#include <coo.h>
typedef struct VBase {} VBase;
typedef struct CBase { VT(VBase) int i; } CBase;
typedef struct VThis {} VThis;
typedef struct CThis { EXTENDS2(CBase,VThis) int j; } CThis;
CThis t={{.CBase={0, 1}}, 1}; //complex
int main() { return 0; }
gcc -fms-extensions
but i want default format:
CThis t={0, 1, 1}; //simple