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 wrote:
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";

You are reaching here, based on your peculiar notion of the relevance of behavior of some target instructions to language semantics. But there is no such relation. The C standard creates a semantic model that is entirely independent of the target architecture with respect to the overflow issue. The behavior of instructions on the machine has nothing to do with what a compiler must implement.

> implies to me an intent that LIA-1 semantics may be
> legitimately presumed "if" the semantics are "supported" by a target
> implementation

It may (and apparently does) imply this to you, but there is
absolutely no implication of this in the standard. if the standard
wanted to say this, it would (although it would be VERY difficult
to state this in meaningful normative form).

> (just as null pointer optimizations should not be
> considered legitimate if not correspondingly literally supported by
> a given target).

There is no such implication in the standard. either

You persist in this strange notion of "factual support" of the
"target", but there is nothing to support this notion in either
the standard

There is reasonable grounds for arguing for limiting the
effects of this particular undefined optimization, but you
can not find any support for this in the standard itself
at all.


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