This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]