Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: John Gordon Ollason
Subject: Compiler differences
Date: 11 Dec 2009, 17:45:57
Frank, My mistake was misunderstanding the defintion of a statement-sequence. Thanks. John O. > > ISO7185 says: > > : The label shall be permitted to occur in a goto-statement G (see > : 6.8.2.4) if and only if any of the following three conditions is > : satisfied. > : > : a) S contains G. > : > : b) S is a statement of a statement-sequence containing G. > : > : c) S is a statement of the statement-sequence of the > compound-statement of the > : statementpart of a block containing G. > > Though this is hardly readable, the "statementpart of a block" means > that the target of a non-local goto must be in the outermost scope > of the procedure. (To understand that, you have to follow the > grammar rules.) > > So, the old gpc was too permissive, the new one behaves acoording to > ISO. > >> Incidentally FreePascal gives the following error for both programs: >> >> Free Pascal Compiler version 2.2.2 [2008/10/26] for x86_64 >> Copyright (c) 1993-2008 by Florian Klaempfl >> Target OS: Linux for x86-64 >> Compiling gototest.p >> gototest.p(5,13) Error: Goto statements aren't allowed between different >> procedures > > Well, Free Pascal doesn't allow non-local gotos at all (and doesn't > claim to support ISO Pascal). > > Frank >
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| John Gordon Ollason | Compiler differences | 11 Dec 2009, 14:06:28 |
| Frank Heckenbach | Compiler differences | 11 Dec 2009, 15:24:15 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).