[patch 4/5] fix bugs with -fstrict-volatile-bitfields and packed structures

Eric Botcazou ebotcazou@adacore.com
Mon Jun 24 15:55:00 GMT 2013


> This part of the patch series fixes problems with bad code being emitted
> for unaligned bitfield accesses, as reported in PRs 48784, 56341, and
> 56997.  A secondary goal of this patch was making the bitfield store and
> extract code follow similar logic, at least for the parts relating to
> -fstrict-volatile-bitfield handling.

Thanks for tackling this.  I think we all agree that making the store and 
extract paths follow a similar logic would be a step forward.  Some remarks:

 - the extract_fixed_bit_field changes look good to me (nice cleanup!) modulo 
s/type/mode/ in the added comment,

 - the store_fixed_bit_field changes are less immediate, as the fallback isn't 
the default behavior (contrary to what the comment says).  I presume that this 
is intended?

 - the extract_bit_field_1 changes look good to me (modulo a superfluous "of 
the field" in the first added comment) but I don't really understand the 
ChangeLog entry; I'd just write "do not short-circuit direct extraction for
flag_strict_volatile_bitfields handling" or something along these lines.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list