Please see below ...
Joe.
-----Original Message----- From: Frank Heckenbach [SMTP:frank@g-n-u.de] Sent: Monday, October 15, 2001 9:50 AM To: cbfalconer@worldnet.att.net; gpc@gnu.de Subject: Re: compiler bug
I'm replying to several mails at once ...
------ snip ------
CBFalconer wrote:
------ snip ------
PROGRAM testnn1;
BEGIN writeln('Testnn fails to detect lack of output file parameter'); (* here is needed a way to return a status *) (* which is missing from ISO Pascal *) (* PascalP uses "terminate(integer)" extension *) END.
This produces a warning with `gpc --standard-pascal'. If you want it to be an error, add `-Werror'.
[Joe da Silva]
Clearly, "output" IS being used by this program, so the fact that it's missing as a parameter of the program, is clearly an error (unless of course, you are compiling to the Borland dialect). If GPC can deal with this (which AFAIK it can), then it's a "non-fatal" error. IMHO, a warning should result only when something is "suspicious", rather than when something is clearly erroneous, as in this example.
PROGRAM testnn2(output);
CONST a = 1;
TYPE b = integer;
CONST c = 2;
BEGIN writeln('Failure to detect misordered declarations'); END.
I'm putting it in the test suite (chuck1.pas), so we can fix it sometime. (Though I must admit that the priority isn't very high, at least for me, since I don't program in plain SP myself, and see such restrictions as rather limiting -- mixing declaration blocks allows for more "topic oriented" structuring. But, of course, to be really conformant, GPC must detect this in the future.)
[Joe da Silva]
What do you consider "Standard"??? As far as I'm concerned, ISO-10206 is the standard to which GPC aspires, so why should GPC regard the above as an error, when this is clearly permitted by ISO-10206. IMHO, ISO-7185 should not be regarded as if it's the one and only Pascal standard. Prospero call this version of the language "Classic Pascal", to distinguish it from "Extended Pascal". I like that idea. I don't think it helps Pascal's image to always refer to ISO-7185 as THE Pascal standard, since this gives the impression of a very restricted and limited language, which is not something that Pascal deserves. I think we should promote the ISO-10206 standard, not pretend there is only one Pascal standard. (Rant over ;-)
"da Silva, Joe" wrote:
... snip ...
What do you consider "Standard"??? As far as I'm concerned, ISO-10206 is the standard to which GPC aspires, so why should GPC regard the above as an error, when this is clearly permitted by ISO-10206. IMHO, ISO-7185 should not be regarded as if it's the one and only Pascal standard. Prospero call this version of the language "Classic Pascal", to distinguish it from "Extended Pascal". I like that idea. I don't think it helps Pascal's image to always refer to ISO-7185 as THE Pascal standard, since this gives the impression of a very restricted and limited language, which is not something that Pascal deserves. I think we should promote the ISO-10206 standard, not pretend there is only one Pascal standard. (Rant over ;-)
What is ISO-10206, and where is it available?
At the same time, GPC should be able to check various portability levels. If the source conforms to a standard, it is compilable under systems that support that standard. If we can't tell it conforms, we can't very well put a stamp on it.
On 16 Oct 2001, at 10:27, da Silva, Joe wrote:
As far as I'm concerned, ISO-10206 is the standard to which GPC aspires, so why should GPC regard the above as an error, when this is clearly permitted by ISO-10206.
It should be reported as a violation if --standard-pascal is specified and should be permitted if --extended-pascal is specified.
(Apologies for being pedantic, but note that the EP standard defines an "error" as "A violation by a program of the requirements of this standard that a processor is permitted to leave undetected." Errors are enumerated in Appendix D of the standard. This case isn't an "error" by that definition.)
IMHO, ISO-7185 should not be regarded as if it's the one and only Pascal standard.
I don't believe anyone is suggesting that. It appears to me that we've been discussing various violations in the context of their applicable standards.
-- Dave
da Silva, Joe wrote:
PROGRAM testnn1;
BEGIN writeln('Testnn fails to detect lack of output file parameter'); (* here is needed a way to return a status *) (* which is missing from ISO Pascal *) (* PascalP uses "terminate(integer)" extension *) END.
This produces a warning with `gpc --standard-pascal'. If you want it to be an error, add `-Werror'.
[Joe da Silva]
Clearly, "output" IS being used by this program, so the fact that it's missing as a parameter of the program, is clearly an error (unless of course, you are compiling to the Borland dialect). If GPC can deal with this (which AFAIK it can), then it's a "non-fatal" error. IMHO, a warning should result only when something is "suspicious", rather than when something is clearly erroneous, as in this example.
OK, I'm changing these to real errors with `--standard-pascal'. However, I don't think the standards define warnings at all, so you might want to consides `gpc --standard-pascal -Werror' a candidate for a standard-compliant compiler. ;-)
I'm putting it in the test suite (chuck1.pas), so we can fix it sometime. (Though I must admit that the priority isn't very high, at least for me, since I don't program in plain SP myself, and see such restrictions as rather limiting -- mixing declaration blocks allows for more "topic oriented" structuring. But, of course, to be really conformant, GPC must detect this in the future.)
[Joe da Silva]
What do you consider "Standard"??? As far as I'm concerned, ISO-10206 is the standard to which GPC aspires, so why should GPC regard the above as an error, when this is clearly permitted by ISO-10206. IMHO, ISO-7185 should not be regarded as if it's the one and only Pascal standard. Prospero call this version of the language "Classic Pascal", to distinguish it from "Extended Pascal". I like that idea. I don't think it helps Pascal's image to always refer to ISO-7185 as THE Pascal standard, since this gives the impression of a very restricted and limited language, which is not something that Pascal deserves. I think we should promote the ISO-10206 standard, not pretend there is only one Pascal standard. (Rant over ;-)
Well, in theory I'd agree, but the terminology that's been used in GPC for a long time is to call ISO-7185 "Standard Pascal" and ISO-10206 "Extended Pascal". Though that's not quite accurate, since 10206 is also a standard, I'm not sure if it's worth the trouble to rename things (including, e.g., the option `--standard-pascal') now ...
Frank
On 16 Oct 2001, at 14:54, Frank Heckenbach wrote:
[Joe da Silva]
What do you consider "Standard"???
[...]
Well, in theory I'd agree, but the terminology that's been used in GPC for a long time is to call ISO-7185 "Standard Pascal" and ISO-10206 "Extended Pascal".
I confess that I missed Joe's point entirely. Now I understand that he meant that "--standard-pascal" should really be named "--pascal" (i.e., the "standard" part is misleading).
Perhaps "--iso-pascal" and "--iso-extended-pascal" would have been better choices for the compiler switches.
I'm not sure if it's worth the trouble to rename things (including, e.g., the option `--standard-pascal') now....
The "trouble" would be minimal, no? Just some string changes?
Personally, it is irrelevant, as I know what is meant. :-) But perhaps Joe can make a case that it would help new users of GPC?
-- Dave
J. David Bryan wrote:
On 16 Oct 2001, at 14:54, Frank Heckenbach wrote:
[Joe da Silva]
What do you consider "Standard"???
[...]
Well, in theory I'd agree, but the terminology that's been used in GPC for a long time is to call ISO-7185 "Standard Pascal" and ISO-10206 "Extended Pascal".
I confess that I missed Joe's point entirely. Now I understand that he meant that "--standard-pascal" should really be named "--pascal" (i.e., the "standard" part is misleading).
Perhaps "--iso-pascal" and "--iso-extended-pascal" would have been better choices for the compiler switches.
I don't see a big difference between `--standard-pascal' and `--iso-pascal' (EP is also ISO). So if anything, I'd tend to `--classic-pascal' or so.
I'm not sure if it's worth the trouble to rename things (including, e.g., the option `--standard-pascal') now....
The "trouble" would be minimal, no? Just some string changes?
I haven't checked how many it would be. For consistency, those internal GPC variables and constants that refer to it should also be renamed, and that's quite a few.
And every user who uses the option would have to change it ...
Frank
On 16 Oct 2001, at 20:34, Frank Heckenbach wrote:
I don't see a big difference between `--standard-pascal' and `--iso-pascal'....
I don't either, except it removes the possibly misleading word "standard" (implying that "standard-pascal" is standardized or preferred, whereas "extended-pascal" is not -- I hope I now take Joe's point correctly :-).
(EP is also ISO).
Hence the suggestion of "--iso-extended-pascal". The title pages of the respective standards say, "Pascal" and "Extended Pascal," so my suggestion incorporated those titles in the switch names.
So if anything, I'd tend to `--classic-pascal' or so.
"Classic Pascal" is meaningless to me (it's actually more suggestive of some variant with proprietary extensions, as the ISO standard was never "classic" in the sense that it was the version that everyone used; GPC is the first Pascal compiler I've used -- and I've used many -- that provides a strict ISO 7185 option).
I'm happy with "--standard-pascal" and "--extended-pascal" if everyone else is.
And every user who uses the option would have to change it ...
Which may be the best argument for leaving it alone.
-- Dave
Frank Heckenbach wrote:
J. David Bryan wrote:
On 16 Oct 2001, at 14:54, Frank Heckenbach wrote:
[Joe da Silva]
What do you consider "Standard"???
[...]
Well, in theory I'd agree, but the terminology that's been used in GPC for a long time is to call ISO-7185 "Standard Pascal" and ISO-10206 "Extended Pascal".
I confess that I missed Joe's point entirely. Now I understand that he meant that "--standard-pascal" should really be named "--pascal" (i.e., the "standard" part is misleading).
Perhaps "--iso-pascal" and "--iso-extended-pascal" would have been better choices for the compiler switches.
I don't see a big difference between `--standard-pascal' and `--iso-pascal' (EP is also ISO). So if anything, I'd tend to `--classic-pascal' or so.
I'm not sure if it's worth the trouble to rename things (including, e.g., the option `--standard-pascal') now....
The "trouble" would be minimal, no? Just some string changes?
I haven't checked how many it would be. For consistency, those internal GPC variables and constants that refer to it should also be renamed, and that's quite a few.
And every user who uses the option would have to change it ...
I vote against any such sweeping change. It is enough to say the --standard-pascal refers to ISO-1.
What is the status of the Extended Pascal (10206) standard? Is it an official standard, or in the proposed state. I just downloaded the postscript version, and that is a monster to handle on this machine. Ghostview takes forever, can't backup, etc. Does anyone have a version converted to text?
J. David Bryan wrote:
On 16 Oct 2001, at 14:54, Frank Heckenbach wrote:
[...]
Well, in theory I'd agree, but the terminology that's been used in GPC for a long time is to call ISO-7185 "Standard Pascal" and ISO-10206 "Extended Pascal".
I confess that I missed Joe's point entirely. Now I understand that he meant that "--standard-pascal" should really be named "--pascal" (i.e., the "standard" part is misleading).
Perhaps "--iso-pascal" and "--iso-extended-pascal" would have been better choices for the compiler switches.
I don't see a big difference between `--standard-pascal' and `--iso-pascal' (EP is also ISO). So if anything, I'd tend to `--classic-pascal' or so.
I agree, and afaik that is also what Joe meant.
"Standard Pascal", and "the Pascal standard" are confusing because the first one is ISO-7185 and the second one can be any of them. I (as Borland dialect user not permanently busy with the standards and non native english speaker) often got a bit confused, and had to reread context several times.
Renaming the old one to classic seems logical. I would leave the --standard-pascal switch for backward compat, and add the --classic-pascal.
I wouldn't make a big deal out of it, and start renaming it everywhere.