freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] those OVERFLOW_* macros and Fontval b69 (Re: Freetype-dev


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] those OVERFLOW_* macros and Fontval b69 (Re: Freetype-devel Digest, Vol 149, Issue 5
Date: Mon, 5 Jun 2017 09:51:02 -0400


>> . Recently, integer overflow run-time checking was activated
>>   (again) for the fuzzer, causing a lot of minor code changes while
>>   applying fixes. [...]
>
> I have been following those new OVERFLOW_* macros... they are a bit
> ugly and mostly purely for suppressing warnings?

Yes and yes.  They are ugly, and I wonder whether I should drop the
`OVERFLOW_' part of its names to get `SUB_LONG', `ADD_INT32', etc.

I am pretty sure that C refuses to define signed overflow and left shift of negative numbers because it does not want to accept "2's complement" as de facto standard. FreeType also pretends to be uncommitted to "2's complement", see ftcalc.c:529 for example. Strangely, these new macros essentially accept "2's complement" as the only true God and as a FreeType requirement. Quiz: when was the last non-2's-complement system made? We a basically entertaining C's stubbornness. Oh well...



reply via email to

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