------- Comment #7 from runipg at broadcom dot com  2010-09-03 03:31 -------
Subject: Re:  Bug with anonymous unions and bit-fields

Wow, So there is a diff inside and outside a struct? 

This is very counter-intuitive but I am  to accept your explanation if that's
what the language says. 

Thanks so much for looking into it and responding. Sorry if it is not a bug, I
googled for anything similar before filing it.

-Runip

On 02-Sep-2010, at 6:11 PM, pinskia at gcc dot gnu dot org
<gcc-bugzi...@gcc.gnu.org> wrote:

> 
> 
> ------- Comment #5 from pinskia at gcc dot gnu dot org  2010-09-03 01:10 
> -------
>      union {
>            unsigned int a : 1,
>               b : 4;
>            unsigned int data;
>      };
> 
> 
> This is an union of three elements each over lapping, that is a:1 overlaps 
> with
> b:4 and data.  So this is expected behavior as far as I can tell.
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45510
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45510

Reply via email to