[Top][All Lists]

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

Re: [PATCH 0/3] yacc: compute the best type for the state number

From: Akim Demaille
Subject: Re: [PATCH 0/3] yacc: compute the best type for the state number
Date: Sat, 5 Oct 2019 16:22:38 +0200

> Le 5 oct. 2019 à 12:30, Paul Eggert <address@hidden> a écrit :
> On 10/5/19 3:07 AM, Akim Demaille wrote:
>>> This is a bug in Clang, as both operands of ? are ptrdiff_t. You might try 
>>> filing a bug report with the Clang folks.
>> Maybe the error in actually in the division by the unsigned and the 
>> diagnostic is wrong. 
> Although that's possible, it'd still be a Clang bug.

Sure it is.  I just wanted to characterize it, and indeed, with a cast, the CI 
was happy.  Your fix is fine too.

> There should be no diagnostic for arithmetic on constants where the result is 
> mathematically correct. GCC generally gets this right.
> My experience in other projects is that we don't have time to maintain 
> workarounds for Clang warning bugs (or for warning bugs in old GCCs, for that 
> matter). But if you want to take on the task,....

Bison is in a different place and cannot be compared to most projects: we embed 
code in project of others.  I don't care that much about bison-the-executable 
(which is in C99 anyway), but the problem at hand is/was in the output.

reply via email to

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