coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-9.4.170-7b206 undefined behaviour in tests


From: Kaz Kylheku
Subject: Re: coreutils-9.4.170-7b206 undefined behaviour in tests
Date: Wed, 27 Mar 2024 10:31:43 -0700
User-agent: Roundcube Webmail/1.4.15

On 2024-03-24 07:20, Bruno Haible wrote: 
> I have proposed a fix for this in
> <https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00055.html>,
> but Paul Eggert opposes it.

I took a look. There are reasons not to like it.

It introduces a PTR_ADD(p, x) abstraction which is only different
from p += x in that it's well defined in the p == 0 && x == 0 case.
This is of low value; plus, its name doesn't reflect the purpose.
It's only used in two places.

The __clang__ ifdef just adds more cruft also. The behavior is
undefined by ISO C, not by Clang.

IMO, the fixes should just be open-coded simply without a macro,
for all platforms.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]