comp.lang.c
[Top] [All Lists]

Re: Union trouble

Subject: Re: Union trouble
From: Richard Bos
Date: Fri, 28 Mar 2008 12:04:19 GMT
Newsgroups: comp.lang.c

"Bartc" <bc@xxxxxxxxxx> wrote:

> Is there a way of using unions transparently, so that the union name doesn't 
> get in the way?
> 
> So:
> 
> union {int a,b;} u;
> 
> a=1;
> 
> instead of:
> 
> u.a=1;

No.

> In particular when the union is inside a struct.

I believe Ganuck offers this as an extension, but it's not ISO C.

Richard

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy