This is the mail archive of the 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: 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      
CodeSourcery, LLC  

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