Hi Richard, On Mon, Aug 28, 2023 at 10:17 PM Richard <richie...@arcor.de> wrote: > On August 28, 2023 11:26:58 AM UTC, Richard <richie...@arcor.de> wrote: > >On August 28, 2023 7:00:07 AM UTC, Geert Uytterhoeven <ge...@linux-m68k.org> > >wrote: > >>On Sun, Aug 27, 2023 at 11:36 AM James Le Cuirot > >><ch...@aura-online.co.uk> wrote: > >>> On Sun, 2023-08-27 at 10:46 +1000, Finn Thain wrote: > >>Perhaps we need a new compiler warning: "hole in structure due to > >>non-natural alignment, please consider adding explicit padding"? > > > >Sounds reasonable but I am afraid in 99% of cases this would be completely > >irrelevant and not break anything so the acceptance would be pretty low. > > On a second thought, that warning might get some acceptance if it is > formulated slightly differently.. making it more clear that the way the > struct is arranged will waste memory in addition to creating potential > portability problems?
It will not always waste memory, only if some members can be moved into holes. Anyway, not wasting memory is merely an optimization. Creating portability problems is a bug, Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org 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