This is the mail archive of the
mailing list for the GCC project.
RE: [RFC, MIPS] Relax NaN rules
- From: Rich Fuhler <Rich dot Fuhler at imgtec dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: "Maciej W. Rozycki" <macro at codesourcery dot com>, Joseph Myers <joseph at codesourcery dot com>, "dalias at aerifal dot cx" <dalias at aerifal dot cx>, "Andrew Pinski (pinskia at gmail dot com)" <pinskia at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "Moore, Catherine (Catherine_Moore at mentor dot com)" <Catherine_Moore at mentor dot com>
- Date: Tue, 25 Mar 2014 20:02:47 +0000
- Subject: RE: [RFC, MIPS] Relax NaN rules
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B023534C5168 at LEMAIL01 dot le dot imgtec dot org> <Pine dot LNX dot 4 dot 64 dot 1403181418140 dot 29154 at digraph dot polyomino dot org dot uk> <6D39441BF12EF246A7ABCE6654B023534C596B at LEMAIL01 dot le dot imgtec dot org> <87bnwy634z dot fsf at talisman dot default> <alpine dot DEB dot 1 dot 10 dot 1403221217120 dot 23119 at tp dot orcam dot me dot uk> <6D39441BF12EF246A7ABCE6654B023534C982C at LEMAIL01 dot le dot imgtec dot org> <87txap40o2 dot fsf at talisman dot default> <6D39441BF12EF246A7ABCE6654B023534CB2C4 at LEMAIL01 dot le dot imgtec dot org>,<87lhvy4pnh dot fsf at talisman dot default>
> The easiest way to do that is to add a flag that either (a) stops the
> compiler emitting a .nan at all or (b) gets it to emit ".nan legacy"
> regardless of the actual encoding used. It's really just a slight
> variation on (2), the difference being that we might be using 2008
> under the covers.
Hi Richard, we talked about (a.) originally - it was the design of the libraries. Joseph,
as I recollect, you raised language issues with requirements for compile-time constant
values for NaNs. Would you accept a non-constant NaN implementation in glibc? Basically,
I would envision __builtin_nan("") to be 0.0/0.0. Probably not a problem for C++ or most code.