This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: "scratch" file bug in g77/egcs1.1b
- To: toon at moene dot indiv dot nluug dot nl
- Subject: Re: "scratch" file bug in g77/egcs1.1b
- From: Mako Sasaki <sasaki at tyo dot sci dot jri dot co dot jp>
- Date: Fri, 25 Sep 1998 17:32:32 +0900
- Cc: egcs-bugs at cygnus dot com
- References: <9809241915.AA19340@moene.indiv.nluug.nl>
Thanks for reply.
From: Toon Moene <toon@moene.indiv.nluug.nl>
Subject: "scratch" file bug in g77/egcs1.1b
Date: Thu, 24 Sep 98 21:15:39 +0200
> I can't find anything in the Standard that suggests REWIND N will
> write an `endfile' record to unit N; in fact, that is what the
> ENDFILE N statement is for.
>
> I do not have an explanation for the different behaviour between
> egcs-1.0.3a and egcs-1.1b.
>
> Hope this helps,
> Toon.
The ISO/IEC 1539 (AKA "Fortran90 Standard") requires writing "endfile record" for REWIND operation in "9.1.3 Endfile record". (I'm looking a japanese translation - JIS X3001. I hope the section number is identical...).
A command "strings a.out" shows that older libf2c uses "tmpnam" and libf2c/egcs1.1b uses "tmpfile" in Linux. It looks that "tmpfile" in Linux2.0 does not create any actual file under "/tmp". This may explain the difference.
I've surveyed the libI77 sources, but complicated ifdef's prevent me from understanding the truth currently ...
Thanks
###############################################################
# Makoto Sasaki
# The Japan Research Inst. Ltd.
# E-Mail: sasaki@tyo.sci.jri.co.jp