[dmd-internals] [D-Programming-Language/dmd] 9a732a: Fix issue 8624 Regression: CTFE: long comparisons ...
Rainer Schuetze
r.sagitario at gmx.de
Mon Sep 10 10:40:29 PDT 2012
On 10.09.2012 11:14, Don Clugston wrote:
> On 10 September 2012 10:33, GitHub <noreply at github.com> wrote:
>> Log Message:
>> -----------
>> Fix issue 8624 Regression: CTFE: long comparisons completely broken
>>
>> An implicit narrowing cast from long to int. Catastrophic.
>
> We might need to do an emergency compiler release because of this bug.
> It's one of the worst I've ever seen.
>
+ { dinteger_t c = ee1->toInteger() - ee2->toInteger();
+ if (c > 0)
+ return 1;
+ if (c < 0)
+ return 1;
Should it return -1 in the second case? It seems the test suite doesn't
do a lot of CTFE long compares...
More information about the dmd-internals
mailing list