Autoconf manual's coverage of signed integer overflow portability

2007-01-02 Thread Paul Eggert
Today I updated the Autoconf manual to contain the following description of the current situation with signed integer overflow. This section of the manual is intended to advise programmers what to do about portable C programs in this area. I think some discussion along these lines also belongs in

Re: Autoconf manual's coverage of signed integer overflow portability

2007-01-02 Thread Paul Eggert
[EMAIL PROTECTED] (Richard Kenner) writes: Many portable C programs assume that signed integer overflow wraps around reliably using two's complement arithmetic. I was looking for an adjective that mean the programs work on a wide variety of platforms, and portable seems more appropriate

Re: Autoconf manual's coverage of signed integer overflow portability

2007-01-02 Thread Paul Eggert
Here are further patches I checked into the Autoconf documentation to reflect today's comments (some of which I received privately). Thanks to all of you. The trickiest bit was documenting one simple way to reliably detect overflow without converting to unsigned and back. (At least, I hope it's