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

--- Comment #5 from Thomas Henlich <thenlich at users dot sourceforge.net> 
2011-01-27 13:25:15 UTC ---
(In reply to comment #3)
> The copy of the F2008 standard I have says in 10.7.2.3.2 F editing:
> 
> "When w is zero, the processor selects the field width."

My interpretation is this:

Section 10.7.2.1 (General rules) applies to these cases, which demands
specifically:

"... the processor selects the smallest positive actual field width that does
not result in a field filled with asterisks. ..."

The statement from 10.7.2.3.2 "When w is zero, the processor selects the field
width." does only refer to this. IMHO it does not suggest the possibility to
include optional characters (a leading decimal zero or plus sign) which make
the field width larger than required.

In the examples, since w=3 ("F3.2") does not result in a field filled with
asterisks, and is the smallest possible such value, the processor must select a
field width of 3.

Also, it is inconsistent that the following commands should result in a
different output:

print "(F0.2)", 0.0
print "(F0.2)", tiny(0.0)

0.00
.00

Reply via email to