>> While most of these changes appear to be correct, I see a regression
on
>> *-*-netware* (which by default uses packed structures) in
>> gcc.dg/20030321-1.c, and I believe the warning tested for cannot be
>> expected (since the code generating the warning tests
>> 
>> TYPE_ALIGN (TREE_TYPE (*node)) <= BITS_PER_UNIT
>> 
>> which cannot reasonably be expected to be true for 'long long'.
>
>Why not?  If you don't get a warning for the attribute being
>ignored then, your target doesn't really pack structures; maybe
>we need to split default_packed into variants.

What has the alignment of type 'long long' to do with structure
packing? Structure packing is exactly to override the alignment of the
type. And in the given situation, alignment of 'long long' is at least
32 (bits), whereas BITS_PER_UNIT is 8, and hence the attribute is really
not ignored (because the alignment gets overridden in order to pack the
field), hence the expectation of a warning here seems wrong. If not, can
you explain what it is that makes you expect a warning here?

>> Can this part of the patch therefore be reverted?
>
>Uh, no.  It works as intended and removing it would cause a
>regression.

Not for *-*-netware*, where the change by itself represents a
regression as the test previously didn't fail.

Jan

Reply via email to