This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g77: 'D' edit descriptor?
- To: gcc at gcc dot gnu dot org
- Subject: g77: 'D' edit descriptor?
- From: Craig Prescott <prescott at bonham dot shr dot cpqcorp dot net>
- Date: Tue, 07 Aug 2001 15:17:10 -0400
Hello;
When used for output processing under g77, the 'D' edit descriptor
produces a number and an exponent separated by an 'E'. I'm not sure
if this is a bug or not (I think it is), but I think most people would
expect to see a 'D' as the separator.
Example:
program junk
double precision dnum
dnum = 1.
write(6,100)dnum
100 format(1x,d9.2)
end
With g77, this produces:
$ g77 -o junk junk.F
$ ./junk
0.10E+01
I don't know what the f77 standard has to say about this, if anything,
but shouldn't the output be:
0.10D+01
FWIW, the Compaq, SGI, and Sun f77 compilers think so.
I know it sounds pretty minor, but this behavior makes looking at
diffs of program output produced by g77 and other compilers more
difficult than it needs to be.
If this is a bug, I'm happy to file a GNATS PR.
(This is with "GNU Fortran 0.5.26 20010731 (experimental)".)
Thanks,
Craig