bug-gnulib
[Top][All Lists]
Advanced

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

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


From: Andrew Pinski
Subject: Re: Autoconf manual's coverage of signed integer overflow & portability
Date: Tue, 2 Jan 2007 19:01:03 -0500 (EST)

> 
> 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 the GCC
> manual.  As I understand it, though, some of the GCC developers are
> loath to make any promises about GCC's behavior on signed overflow, so
> the exact wording might be controversial.
> 
> Eventually I'd like to add better support for -fwrapv and the like to
> Autoconf, but that can wait for further thought and experimentation.
> 
> Comments are welcome of course.

Really this should be documented in the C books people learn from.  This
problem is that those books don't talk about these undefined behavior at 
all.  Aliasing has the same issue.  So does sequence points.  New code
should not be punished because the standard books that people learn from
are all broken.  I can tell you most C/C++ books don't talk any undefined
behavior at all.

Also most C++ books don't talk much about namelookup in templates either
which is the other highly reported non bug to GCC.

-- Pinski




reply via email to

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