Re: pgsql: Provide overflow safe integer math inline functions. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Provide overflow safe integer math inline functions.
Date
Msg-id 3357.1513526629@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Provide overflow safe integer math inline functions.  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: pgsql: Provide overflow safe integer math inline functions.  (Michael Paquier <michael.paquier@gmail.com>)
Re: pgsql: Provide overflow safe integer math inline functions.  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
Michael Paquier <michael.paquier@gmail.com> writes:
> ... Please note that if you added
> a volatile cast to "result" as well, then compilation was able to
> complete and regression tests passed...

Yeah, that squares with my analysis: the problem with the existing test
is that the compiler is throwing away the function call because its
output is unused.

If I haven't seen something from Andres shortly, I'll push a fix.

            regards, tom lane


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Provide overflow safe integer math inline functions.
Next
From: Tom Lane
Date:
Subject: pgsql: Try harder to detect unavailability of__builtin_mul_overflow(in