On Wed, Feb 8, 2017 at 9:23 PM, Mikael Morin <morin-mik...@orange.fr> wrote: > Le 08/02/2017 à 10:25, FX a écrit : >> >> Hi Steve, >> >> I see Mikael has okayed the patch, but I did not have any time to comment >> prior. I wanted to note that: >> >> - the choice was deliberate, as the standard allows us to choose which >> real kind REAL128 corresponds to when there are several matching choices. >> The idea behind the current choice was to avoid forcing the use of slower >> soft-float arithmetic when a hardware type existed. I don’t have a strong >> opinion myself on the issue. > > Hello, I didn’t have this in mind when I OKed the patch. > Still, I think the rule above goes against the principle of least surprise. > Actually I don’t really see the use case for these constants. > When would a user say; give me a real that big, including padding bits?
IMO, the current behavior is confusing and unportable, users shouldn't need to know target ABI details to understand why the compiler chooses the kind it does. FWIW wikipedia gets it wrong too, see https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format . So I think Steve's patch is a clear improvement. That being said, I think even with Steve's patch, it's not guaranteed to give you IEEE 754-2008 binary128. E.g. on IBM POWER targets, depending on the ABI you may get an IBM extended double (double-double or __ibm128) format. Although if IEEE binary128 is also available, with Steve's patch you should get that one has it has more precision that __ibm128. > >> >> - Is this appropriate for stage 4? >> > Now that you remind of it, if we take the rules to the letter, no. > My opinion is that it should be accepted, in stage 4 or later. > But I don’t have a strong opinion about it either. I think it's Ok, the patch is quite small and unlikely to cause regressions. In particular since the ABI has already been bumped, now is a good time to piggyback other ABI changing stuff. Steve, please don't revert, but add a note to gcc-7/changes.html and the GFortran wiki. -- Janne Blomqvist