http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47434

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-27 
13:30:30 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > Regarding the other cases:
> > Similarly for the '+' sign on Inf.  Until now we have chosen to emit the
> > optional characters.

There seems to be a bug with regards to S:

  print "(s,F0.2)", inf

still prints "+Inf". ("The edit descriptors SS, SP, and S set the sign mode
corresponding to the SIGN= specifier values SUPPRESS, PLUS, and
PROCESSOR_DEFINED, respectively.")


"(6) On output, with I, B, O, Z, F, and G editing, the specified value of the
field width w may be zero. In such cases, the processor selects the smallest
positive actual field width that does not result in a field filled with
asterisks" (10.7.2.1 General rules)

I have to agree with Thomas here: ".00" and "Inf" are the shorted possible
strings, unless SP (sign="PLUS") is used; then "+.00" and "+Inf" are the
shortest possible strings.

In that sense, none of my 10 compiler gets it right ...

Reply via email to