Hello,
Because of feedback I received from the GPC list, I have revised the review of GPC. The new version follows.
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 ISO 7185 standard requires that such missing eolns be automatically inserted. On GPC, this behavior is enabled by the --standard-pascal option, but was not usable on the version tested because it incorrectly flagged valid ISO 7185 constructs as errors in the source.
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>