According to Paul Doerwald:
I changed char *version_string = "2.8.0", compiled, and everything works nicely now. [...]
:-)
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.0/specs gpc driver version 980420(2.8.0) executing gpc version 2.8.0 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.0/gpc-cpp -lang-pascal -v -nocharescape -undef -D__GNUC__=2 -D__GPC__=2 -D__GNUC_MINOR__=8 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_LITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -Di386 -Di586 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i586__ -Asystem(unix) -Acpu(i386) -Amachine(i386) hello.pas /tmp/cca08525.i GNU CPP version 980420(2.8.0) (i386 GNU/Linux with ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/i586-pc-linux-gnulibc1/include /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.0/include /usr/include End of search list. /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.0/gpc1 /tmp/cca08525.i -quiet -dumpbase hello.pas -version -famtmpfile=hello.gpc -o /tmp/cca08525.s GNU Pascal version 980420(2.8.0) (i586-pc-linux-gnulibc1) compiled by GNU C version 2.8.0. /tmp/cca08525.i:1: numeric constant with no digits /tmp/cca08525.i:1: numeric constant with no digits /tmp/cca08525.i:1: invalid #line /tmp/cca08525.i:2: warning: missing program header /tmp/cca08525.i:2: parse error at null character
I cannot locate the problem from this. Since you reported that everything works now with the "version_string" change, I suspect that the problem leading to this was fixed somewhere after gpc-980420. Well, we will see after the next alpha release.
What I did was change 5987 to TREE_OPERAND (target), and when bison complained, I changed it *back* to TREE_OPERAND (target,1), and everything worked. ??
Now I understand: You had a correct version of `parse.y', but a wrong one of `parse.c'. After your changes, bison updated `parse.c', and everything was fine. :-)
Thank you, though, for helping me get gpc to compile. Now I can actually do some programming (now that summer is here and school is over, and I have *time* to program! :-)
You lucky one! ;-)
If you are ambitious, what about porting CRT to Linux? Many people would appreciate that.
Greetings,
Peter