> > I'm having a hard time with the simplicity of your question:
> > ? Certainly, I don't expect that to answer your question, but I
> > don't understand why.
>
> The problem I am running into is that the double in this struct is
> only 4-byte aligned on darwin:
>
> struct X { int A; double B; };
>
> This is modified by things like ADJUST_FIELD_ALIGN and
> ROUND_TYPE_ALIGN. As such, I don't think there is a way to get this
> alignment in a target-independent way. Does that sound right?
You want the alignment of B in that struct in source code and not in GCC?
If so you want to do:
struct X { int A; double B; };
int f(void){struct X b; return __alignof__(b.B);}
-- Pinski