This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: 31 Dec 2006 19:48:42 +0100
- Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- References: <C1BD5869.F6B7%schlie@comcast.net>
Paul Schlie <schlie@comcast.net> writes:
| Upon attempted careful reading of the standard's excerpts quoted by
| Gabriel Dos Reis per <http://gcc.gnu.org/ml/gcc/2006-12/msg00763.html>,
| it's not clear that GCC's current presumption of LIA-1 overflow semantics
| in absents of their true support is actually advocated by the standard.
|
| As by my read, it seems fairly clear that "If an implementation adds
| support for the LIA-1 exception values ... then those types are LIA-1
| conformant types"; implies to me an intent that LIA-1 semantics may be
| legitimately presumed "if" the semantics are "supported" by a target
| implementation (just as null pointer optimizations should not be
| considered legitimate if not correspondingly literally supported by
| a given target).
Note, however, that LIA-1 conformance -- just like IEEE-754
conformance -- is more than just wrapping semantics.
Interestingly, GCC/g++ advertises wrapping semantics for the following
types
* char
* signed char
* unsigned char
* wchar_t
* short
* unsigned short
* int
* unsigned int
* long
* unsigned long
* long long
* unsigned long long
this ad is brought to you by std::numeric_limits<T>::is_modulo.
-- Gaby