I have completed a periodic update of a review for the GPC compiler with respect to its' ability to compile and run ISO 7185 level 0 standard programs. I present it here in advance of posting it on the web site:
http://www.moorecad.com/standardpascal/compiler.html
In order to give the members of the GPC group a chance to correct any errors or raise any complaints.
You will please note that there is a section for GPC originator comments. I would be happy to accept any reasonable section the GPC group would wish to include in that section, limited only by size and taste concerns.
I note that the web page for GPC does not specify who speaks for GPC, so I would only ask that if multiple people wish to post such a comment, the GPC group would work between its members to prepare a coordinated submittal.
Thank you,
Scott Moore
<below contains the review> ======================================================================== GPC
Last verified: November 25, 2007 ISO 7185 full standard test: One failure (see explanation) Version: gpc version 20051116, based on gcc-3.4.4 Pascal-s compile/run: Pass
Implementation first order details:
Processor run on: AMD Athlon 3200+ Bits: 32 Value of maxint: 2147483647 Default integer field width: 11 characters Default real format field width: 29 characters Default boolean field width: 6 Default character field width: 1 character. Implementation character set: ASCII
My comments:
1. Test failure on ISO 7185 section 6.4.3.5, specifically the requirement that each line consist of a sequence of characters terminated by the eoln sequence. When a temporary (unnamed) file was output with an incomplete last line, and subsequently read back, the last eoln was found to be missing. The responsible parties for GPC have informed me that this problem has been fixed in the current version of GPC. When I am able to obtain and test that version, I will update this information.
2. The date of the version tested is fairly old (2005, above). The test was done using a "prebuilt" version of GPC (their terminology) from the GPC web site. The maintainers have recommended using a newer build of the source, which I didn't do for the following reasons. First, there is considerable effort involved with building GPC from source, and GPC is highly cross coupled to building GCC, itself a significant undertaking. Second, I don't believe most users would build their own new version, for similar reasons. Finally, the "current version" involves building from the current source with patches. It would be next to impossible for me to accurately specify such a "version" of the software.
3. The GPC documentation inaccurately states that the flag "--standard-pascal" is all that is needed to insure ISO 7185 level 0 compliance. In fact, this switch was found broken at the time of testing, and caused several normal ISO 7185 features to be incorrectly flagged as errors/warnings. In addition, the flag --field-widths was found to be needed. Finally, the version tested output several warnings with no relationship to Pascal (in fact, they were C language warnings). The net command syntax required to accurately compile ISO 7185 Pascal using GPC is:
gpc --field-widths -Wno-warnings -o <program> <program>.pas
Where <program> is the name of the Pascal program to be compiled.
GPC originator comments:
<Not supplied> =========================================================================