Maurice:
Strange. doing the same on DJGPP (W98se DOS box) with gpc 20041218 based on gcc 3.2.3 behaves as expected.
Hmm. I don't understand why it would be an issue on a Sun!
All is done manually with suitable tools to binary visualize the true content of files, no shell scripts or functions which could be too intelligent (I have bash, no tcsh) and hide something "unimportant", for example no linefeed or ^Z (a DOS nicety on text files) added at the end.
The script demonstrated in three ways that the files had zero length.
A side comment: to make it work I needed to compile with gpc add the --transparent-file-name option to gpc (otherwise the filenames are asked at the beginning of the execution) Why did you not need it ?
You are right. I use a script, gpcc, which uses that option.
The files are definitely empty - there is no need for me to clear them inside the Pascal program. The script uses `echo -n ""` to make them and three different standard unix tools (ls, wc, file) say they contain zero bytes. The results were in the initial report.
I have just discovered something else. Using the *same* code and the *same* input files:
gpc 20040516, based on gcc-3.3.3 fails (says empty files are not eof after reset).
but the older
GNU Pascal version 2.1 (20020510), based on gcc-2.95.2 19991024 (release). works! (says empty files are eof after reset)
Thus the behavior of GPC has changed between these two.
From my viewpoint this is an extremly serious bug because so many of
my programs use the eof test. What's happening is that I'm slowly updating programs and so I didn't notice it until now. I spent all night the other day trying to figure a way to replace eof with something that worked (using eof but is still standard) but failed. If I have to use the p2c converter to work with my programs, I will be forced to abandon GPC, just as I was converting all programs to function smoothly with it ... :-( This is now true for one program.
I hope that this can be solved!
Regards,
Tom
Dr. Thomas D. Schneider National Cancer Institute Laboratory of Experimental and Computational Biology Molecular Information Theory Group Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu (use only if first address fails) http://www.lecb.ncifcrf.gov/~toms/