------- Comment #2 from dsiata at poczta dot onet dot pl  2006-09-14 08:14 
-------
Subject: Re:  wrong alignment with pragma pack(4)

U¿ytkownik pinskia at gcc dot gnu dot org <[EMAIL PROTECTED]> napisa³:
>------- Comment #1 from pinskia at gcc dot gnu dot org  2006-09-14 08:05 
>-------
>#pragma pack(4)
>"Variable D is aligned on 4 bytes and should be 8."
>No you said to align it to 4 bytes by that pack statement.
>
>This is not a bug.
>Why do you think otherwise?
>
>
Because double have to be aligned on 8 on sparc or bus error occurs.
Note that first member of the structure is double. So now I'm not able to
assign any value to D.a.
If pragma pack regards to all structures then should be some error reported if
structure inside pragma pack(4) contain double or long long...

Regards
Dominik


-- 


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

Reply via email to