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

--- Comment #11 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> 2011-07-19 16:57:00 UTC ---
> Do struct alignment rules on Tru64 have an effect? Not that I
> looked-up/read the ABI details..

I had a look at `Calling Standard for Alpha Systems', and the rules
seemed as expected and straight-forward.

> But I'd be curious what this does:
>
> #include something
> #include stddef.h
>
>
> int main()
> {
> typedef struct { char a; sem_t b; } t1;
>  printf("%u %u\n", sizeof(t1), offsetof(t1, b));
>  return 0;
> }
>
>   5 or 6 or 8 or other?
>   and 1 or 2 or 4 or other?
>   If the alignment is really only 2, then I'd expect 6 and 2.

This is what I get, with both cc and gcc.

    Rainer

Reply via email to