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> =========================================================================
Scott Moore wrote:
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)
My comments:
- 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.
The paragraph above is a misunderstanding: the behaviour you see is _expected_ in default GPC mode. Only if you give '--standard-pascal' flag you should get standard compiant behaviour. If you care only about this problem updating to newer version is both useless and not necessary: starting from (at least) May 2004 all versions should behave the same.
- 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.
You did not show us any example warnings, so we can not tell if warnings are justified. Note however, that warnings are about _legal_ constructs which are considered to be likely errors, and that likely errors depend on preferred programming style which is highly subjective.
Concerning errors: you reported 3 errors. One is fixed in widely distributed versions (starting from 20060215), the other 2 were new ones and currently require applying a patch. I know about a few other cases where version 20051116 with the "--standard-pascal" flag rejected valid programs which were fixed in gpc-20060215.
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>
Scott Moore wrote:
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:
- 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.
- 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.
- 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>
First, let me say that I appreciate very much effort you put into ISO compliance testing. I understand why you used version 20051116 -- your explanation is clear and I find it quite reasonable.
Concerning warnings: a lot of effort went into generating useful warnings so I am slightly disturbed that you had to use "-Wno-warnings" flag. But warnings are more about quality than about compliance. So it it probably not worth changing what you wrote.
Concerning "--standard-pascal" flag: I am not happy that you had problems with it. But you report your findings, and I think that what you wrote is accurate.
To summarize: thank for working on the report. I feel that there is no need to add extra comment to your report.