This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Proposed appoach for PR32611 output negative signs for zero


Jerry DeLisle wrote:
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

Makes sense to me.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]