[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tail: avoid theoretically undefined behavior
From: |
Jim Meyering |
Subject: |
Re: [PATCH] tail: avoid theoretically undefined behavior |
Date: |
Wed, 28 Dec 2011 22:30:03 +0100 |
Pádraig Brady wrote:
> 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.
Thanks.
My only doubt is whether to include the word "theoretically"
in the one-line summary ;-)