This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC floating point usage
- From: Mark Mitchell <mark at codesourcery dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Michael Matz <matz at suse dot de>, Geoff Keating <geoffk at geoffk dot org>, "mrs at apple dot com" <mrs at apple dot com>, "steby at enea dot se" <steby at enea dot se>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 16 Oct 2002 14:54:29 -0700
- Subject: Re: GCC floating point usage
I am reserving final judgment until I see a complete definition of
the semantics and an implementation
If maintainers take the attitude that they will not make a judgement
about semantics before seeing an implementation, the bar has been set
too high.
There is no reason that a contributor should have to actually implement
something before we decide if we want it. We should say "yes, that
is a feature we want" or "no, it is not". Obviously, we don't want it
at any cost; if it is a ten-thousand line horribly ugly patch for a
not-terribly-desirable feature, it's not a winner. But, we should be
able to say "yes, that feature is a good one; if the patch is small and
clean we'll take it."
Since you think the semantics are unclear, I'll make an effort to state
them again:
If the user does not explicitly use floating point at the source
level, the compiler will not generate reads to or writes from the
floating point registers that can ever be executed by the program,
unless that program calls "setjmp" or makes use of exception-handling.
We can define "at the source level" to mean something appropriate for
every programming language in question; in the case of C and C++:
To use floating point at the source level in C or C++ means:
- To declare an automatic variable of floating point type.
- To define a function with a parameter of floating point type, or
a return value of floating point type.
- To write any expression which has a floating point type.
The C standard defines "floating point type", or some very similar term,
as meaning "float", "double", or "long double".
Will you accept a patch to implement those semantics?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com