Re: Plan needed for switching m68k to 32-bit alignment
Geert Uytterhoeven <[email protected]>
| Newsgroups | gmane.linux.debian.ports.68k,gmane.linux.ports.m68k |
|---|---|
| Message-ID | <CAMuHMdV4T1jELrZJbyxkYDo4MSfm=2CGCz2tJ6DqOqjjiN5_AQ@mail.gmail.com> |
On Sun, Oct 27, 2024 at 7:16 AM Finn Thain <[email protected]> wrote: > On Sun, 27 Oct 2024, Thorsten Glaser wrote: > > Finn Thain dixit: > > > > >That would mean __alignof__(foo.b) == sizeof(foo.b) but that's not the > > >case on my Linux/i686 system. 4 != 8: > > > > > >struct baa { > > > int a; > > > long long b; > > >} foo; > > > > That struct is just 12 bytes for you then? > > Right. i686 and m68k agree on that. On i686 (i.e. gcc -m32 on amd64): __alignof__(long long) = 8 but sizeof(struct baa) = 12 __alignof__(struct baa) = 4 ??? Isn't the alignment of a struct the largest alignment of any of its members? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds