This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Please support coo.h


On 06/10/2010 10:57 AM, yuanbin wrote:
initialization of the enum:
^^^^ you mean union.
enum {
   int i;
   float f;
} t={1.5}; //t.f

The above makes no sense, what if you have int and char?


You have to say

union { ... } t = { .f = 1.5 };

and that already works in GCC. If anything else is required by "coo", that means "coo" is not written in standard C.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]