public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "thenlich at users dot sourceforge.net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/47567] Wrong output for small absolute values with F editing
Date: Mon, 07 Feb 2011 08:21:00 -0000	[thread overview]
Message-ID: <bug-47567-4-letyaWPT9f@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47567-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Thomas Henlich <thenlich at users dot sourceforge.net> 2011-02-07 07:01:14 UTC ---
(In reply to comment #11)
> Fixed on trunk.  I don't think this is significant enough to justify a
> back-port. I am not sure why anyone would use f1.X for anything, so this
> exercise is largely academic. I do appreciate the bug reports. Thanks

Thank you for your work on this and for the fast response, which is actually
better than what you get from the "premier" support of some big commercial
compiler vendors.

Of course I agree with you that noone would use (F1.n) editing, that was
exactly my point, see my comment #1: "Any formatting ... with (F1.n) should
always result in asterisks".

However, because of the rule for (F0.n) we need to make clear what is "the
smallest positive actual field width that does not result in a field filled
with asterisks".

print "(F0.0)", 0.0   ! => 0

I'm still pretty sure that this is not compliant to Fortran 2003/2008 and I
would like a convincing explanation why it should be. Of course I can
understand the argument that "0" instead of "0." is useful to express the "real
zero", but I think standard-compliance takes precedence, making it easier for
the user to write portable programs.

In my interpretation, the demand of "a string of digits that contains a decimal
symbol" is equivalent to the syntax:

DIGIT ... DECIMAL-SYMBOL [DIGIT] ...
|
[DIGIT] ... DECIMAL-SYMBOL DIGIT ...

The clause "The optional zero shall appear if there would otherwise be no
digits in the output field." rules out the string becoming just:

DECIMAL-SYMBOL

As I see it, the decimal symbol is not optional and cannot be left out, so the
output "0" is illegal.

The phrase "contains" means that e.g. the Java method
string.contains(decimal_symbol) would return true.


  parent reply	other threads:[~2011-02-07  7:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01  9:42 [Bug libfortran/47567] New: " thenlich at users dot sourceforge.net
2011-02-01 11:27 ` [Bug libfortran/47567] " burnus at gcc dot gnu.org
2011-02-01 13:48 ` jvdelisle at gcc dot gnu.org
2011-02-05  1:33 ` jvdelisle at gcc dot gnu.org
2011-02-05  2:10 ` jvdelisle at gcc dot gnu.org
2011-02-05  6:22 ` jvdelisle at gcc dot gnu.org
2011-02-05  7:41 ` thenlich at users dot sourceforge.net
2011-02-05  7:46 ` thenlich at users dot sourceforge.net
2011-02-05  7:53 ` thenlich at users dot sourceforge.net
2011-02-05 13:15 ` jvdelisle at gcc dot gnu.org
2011-02-05 17:59 ` jvdelisle at gcc dot gnu.org
2011-02-06 22:15 ` jvdelisle at gcc dot gnu.org
2011-02-07  8:21 ` thenlich at users dot sourceforge.net [this message]
2011-02-08  7:17 ` thenlich at users dot sourceforge.net
2011-02-08 12:40 ` jvdelisle at gcc dot gnu.org
2011-02-17  6:51 ` jvdelisle at gcc dot gnu.org
2011-02-17 19:40 ` jvdelisle at gcc dot gnu.org
2011-02-19 15:20 ` jvdelisle at gcc dot gnu.org
2011-02-19 15:36 ` jvdelisle at gcc dot gnu.org
2011-02-19 15:53 ` jvdelisle at gcc dot gnu.org
2011-02-21 13:42 ` thenlich at users dot sourceforge.net
2011-02-21 14:30 ` jvdelisle at gcc dot gnu.org
2011-02-21 14:33 ` jvdelisle at gcc dot gnu.org
2011-02-24  5:32 ` jvdelisle at gcc dot gnu.org
2011-02-24  5:33 ` jvdelisle at gcc dot gnu.org
2011-02-24  6:59 ` jvdelisle at gcc dot gnu.org
2011-02-25 14:05 ` thenlich at users dot sourceforge.net
2011-02-25 14:08 ` thenlich at users dot sourceforge.net
2011-02-28 21:41 ` jvdelisle at gcc dot gnu.org
2011-03-01  2:25 ` jvdelisle at gcc dot gnu.org
2011-03-01  2:28 ` jvdelisle at gcc dot gnu.org
2011-03-01  2:30 ` jvdelisle at gcc dot gnu.org
2011-03-02 14:01 ` thenlich at users dot sourceforge.net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47567-4-letyaWPT9f@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).