On 05/16/11 15:01, Pádraig Brady wrote:
> I just noticed this excellent paper on AIR integers
> http://www.cert.org/archive/pdf/09tn023.pdf
Thanks, this inspired me to add intprops documentation
to the gnulib manual, which I just pushed. There's
an updated version of that paper, at:
http://www.s
I just noticed this excellent paper on AIR integers
http://www.cert.org/archive/pdf/09tn023.pdf
which also summarizes other run-time integer
overflow handling methods, including precondition testing
as implemented by Paul's handy new macros.
cheers,
Pádraig.
On 05/10/11 09:54, Paul Eggert wrote:
> This proposal also uses "SUM"
> instead of "ADD", "DIFFERENCE" rather than "SUBTRACT", etc., for
> reasons that escape me: I can easily change the names back if that's
> what people prefer.
Nobody expressed a preference, but I liked the old names so I change
On 05/06/11 03:41, Bruno Haible wrote:
>ADD_OVERFLOW (a, b, unsigned int)
> is easier to write and understand than
>ADD_OVERFLOW (a, b, 0, UINT_MAX)
OK, but "ADD_OVERFLOW (a, b)" is easier yet, no? And this would
address Ben's comment that the macro should check the types of the
arguments
Paul Eggert writes:
> I am adding some integer overflow checking to GNU Emacs, and RMS
> suggested that I make it a gnulib module, which sounds like a good
> suggestion, so here's a proposed module.
They seem like a good idea.
Did you consider adding some checking for their constraints, such
as
Hi Paul,
Paul Eggert wrote:
> integer overflow checking ... a gnulib module, which sounds like a good
> suggestion
Yes, it's definitely a good idea.
How often will the min and max arguments be chosen to be different from
the minimum and maximum of the type? I'd like to see variants which take
th