This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Proposed appoach for PR32611 output negative signs for zero
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Date: Sun, 08 Jul 2007 10:34:28 -0700
- Subject: Proposed appoach for PR32611 output negative signs for zero
Hi All,
I am proposing the following approach to this issue of printing a negative sign
for zero.
The Fortran 77 standard explicitly prohibits printing the negative sign. The F95
and F2003 standards only say that if the internal value is negative a negative
sign is output.
I personally struggle with interpreting a zero as having a negative value and so
I could interpret this to mean I don't have to print a negative value if I don't
feel like it (liberal thinking) because zero is zero.
However, Metcalf, Reid, and Cohen state that the IEEE -0 is "respected" for
output. So out of respect, I think I should print it.
Therefore, I propose that with -std=legacy we do not print the sign, otherwise
we do. This means that -std=legacy will be required to pass NIST. It also
means that in this case we will not match up with g77 behavior without -std=legacy.
Opinions please.
Jerry