Frank & Gale--
Thanks for your quick response to my e-mail. Most of the errors you refer to are well-localized in Knuth's source, and are part of the program that is meant to be modified to suit the particular platform that is being ported to. Once the WEB system is bootstrapped, each of the issues except for the for-loop one is a one-line change in the original source. At least in this respect, Knuth had the foresight to allow his programs to survive for what is a very long time in computer terms!
Knuth was not programming in dec-pascal; as I recall it was in Pascal-H on the SAIL system. So I am not surprised that compiler directives have changed.
However, on the for loop issue, I can see no practical advantage to enforcing this point of the standard to the point of not compiling the program. Can this aggressive behavior possibly be restricted to a --pedantic mode? I.e., can the error be demoted to a warning unless a --pedantic mode is enabled?
On a larger scale, I think it is more useful for GPC to allow existing Pascal programs, with all their flaws, to be ported to GNU and other modern systems than for it to act as an enforcement mechanism to ensure that any Pascal programs that have harmless violations of the standard get weeded out. gcc as a whole takes a similar approach, I think.
Thanks again to all the GPC contributors for an excellent tool!
--Joe Oswald
I tried to compile Web and TeX and noticed a few more problems, though apparently all quite minor:
- a lot of warnings which all seem to be harmless, but point to unniceties in the code
Time for `--dec-pascal' ...?
In the area of for-statements, there are latent errors in quite a few programs since there are quite a few compilers around which don't enforce all the for-statement requirements.
Seems quite so. (GPC does one or two more now, but still not all.)
_________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
Joseph Oswald wrote:
Thanks for your quick response to my e-mail. Most of the errors you refer to are well-localized in Knuth's source, and are part of the program that is meant to be modified to suit the particular platform that is being ported to. Once the WEB system is bootstrapped, each of the issues except for the for-loop one is a one-line change in the original source. At least in this respect, Knuth had the foresight to allow his programs to survive for what is a very long time in computer terms!
I agree. However, I'd have preferred if the compiler/system dependent parts were put in a separate file so they could be changed more easily and shared between projects (e.g., many of the issues of Web and TeX are the same).
However, on the for loop issue, I can see no practical advantage to enforcing this point of the standard to the point of not compiling the program. Can this aggressive behavior possibly be restricted to a --pedantic mode? I.e., can the error be demoted to a warning unless a --pedantic mode is enabled?
OK, I'll turn it into a warning unless one of the standards is selected (or `-Werror' given, of course).
Gale Paeper wrote:
With some 'net seaching, I found a location with a set of "master files personally by Donald E. Knuth" at ftp://ctan.tug.org/tex-archive/systems/knuth/. In that file set, there are change files with comments like "Change file for GNU Pascal and Linux".
I had looked there ... OK, found it now (didn't see initex.ch before).
Never having worked with Web and TeX code before, I don't know how much help those files will be in fixing the problems but it does seem to have a some promising potential.
I suppose so. Knuth himself reported two GPC bugs in Apr 2000 on this list when he made the files.
Unfortunately they refer to GPC internals (via ext.h) which have changed since then. I suppose it shouldn't be too hard to rewrite it all using the facilities in the GPC module. (And the result will then probably not be Linux-specific, but work on all GPC targets.)
Frank