Linux: Dropping Support for GCC 2.95

Ben Duncan bns
Wed Dec 14 20:42:43 PST 2005


Thanks .. seems the one of the biggest dif is 2.95 does not support
Anon and 3.x does ...

(I hope I got that right ...)

Interesting stuff ...




Kurt Wall wrote:
> On Wednesday 14 December 2005 07:28 am, Ben Duncan wrote:
> 
>>Ok, question:
>>
>>What exactly are : anonymous unions and anonymous structures?
> 
> 
> Precisely what the names imply, unions and structures that lack
> names. A named union might look like
> 
> union {
>     int i;
>     float f;
> } u;
> 
> In this case, the name of the union is "n". Now, wrap it in a structure:
> 
> struct s {
>     union {
>         int i;
>         float f
>     } u;
> };
> 
> To assign a value to i, you have to write "s.u.i = 10;".
> 
> An unnamed union would be declared:
> 
> union {
>     int i;
>     float f;
> };
> 
> Wrapped in our structure, it looks like"
> 
> struct s {
>     union {
>         int i;
>         float f;
>     };
> };
> 
> Now, to assign a value to i, you simply write "s.i = 10;". So, anonymous 
> unions make it possible access union members directly rather than
> through the union name.
> 
> Kurt

-- 
Ben Duncan   - VersAccounting Software LLC 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
        - Hanlon's Razor



More information about the Linux-users mailing list