Re: Tuple and changes for m68k with -malign-int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Richard,

On Mon, Aug 28, 2023 at 10:17 PM Richard <richiezid@xxxxxxxx> wrote:
On August 28, 2023 11:26:58 AM UTC, Richard <richiezid@xxxxxxxx> wrote:
On August 28, 2023 7:00:07 AM UTC, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
On Sun, Aug 27, 2023 at 11:36 AM James Le Cuirot
<chewi@xxxxxxxxxxxxxxxxx> 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 -- geert@xxxxxxxxxxxxxx

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



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux