Definition of Overflow and Range Check lazarus / 64-FPC development ---------------------------------------------------------------------- MathMan · 2020-06-14 10:10 Hi all, I am using FPC 3.0.4 on Linux 64 bit. In my int128 library I want to replicate / extend overflow and range checking to the new int128 types, in line with what FPC provides for existing ordinal types. To that end I have studied the assembler output generated by FPC for two weeks now, but fail to understand the general approach followed by FPC on ordinal types. Is overflow and range checking documented somewhere, so that I can look it up and translate to the int128 types? Kind regards, MathMan ---------------------------------------------------------------------- Jonas Maebe · 2020-06-14 10:30 See https://bugs.freepascal.org/view.php?id=25201#c70854 for the details. ---------------------------------------------------------------------- MathMan · 2020-06-14 10:57 Thanks Jonas, that explains a lot of the things I have seen so far. My takeaway is that I must include the range checks for assignment and comparison operator overloads, and only do overflow on arithmetics. This should reasonably be in line with FPC then.