RFC: PATCH to layout_decl for middle-end/27945

Jason Merrill jason@redhat.com
Wed Sep 12 15:44:00 GMT 2007


Jason Merrill wrote:
> It occurs to me that this would be a useful optimization for other 
> languages as well, as long as it's only a single field that's packed, 
> not the whole record.

On investigation, it seems that we already optimize loads from a packed 
field that gets the appropriate alignment from its position in the struct.

It seems that the functionality you want makes the packed directive on 
Date_And_Time_T do nothing.  Is it the case that for Ada you only want 
the packed directive to affect the fields, not the record as a whole? 
If so, you could just not set the flag on the record and you should get 
the behavior you want.

Jason



More information about the Gcc-patches mailing list