bug-gnulib
[Top][All Lists]
Advanced

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

Re: proposed new module intoverflow


From: Bruno Haible
Subject: Re: proposed new module intoverflow
Date: Fri, 6 May 2011 12:41:28 +0200
User-agent: KMail/1.9.9

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
the type as argument and deduce the min and max via TYPE_MINIMUM and
TYPE_MAXIMUM from intprops.h.
   ADD_OVERFLOW (a, b, unsigned int)
is easier to write and understand than
   ADD_OVERFLOW (a, b, 0, UINT_MAX)

Bruno
-- 
In memoriam Pim Fortuyn <http://en.wikipedia.org/wiki/Pim_Fortuyn>



reply via email to

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