coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tail: avoid theoretically undefined behavior


From: Pádraig Brady
Subject: Re: [PATCH] tail: avoid theoretically undefined behavior
Date: Wed, 28 Dec 2011 18:27:19 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 12/28/2011 05:56 PM, Jim Meyering wrote:
> Can anyone name a real system on which forming a pointer like this,
> "buffer + (size_t)(-1)" actually provokes a trap or some other real problem?

I don't know of particular hardware where this would trap
(alpha can be configured to trap on integer overflow I think).

Your change is worth it for clarity at least.

cheers,
Pádraig.



reply via email to

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