For sure I read paragraph 6.13 of ISO 10206 before asking your advice. I must say, for me the Note 1:
:1 This International Standard constrains the order of program-components of : a conforming program only by the partial ordering defined by 6.2.2.9. A : further restriction by a processor on the order of program-components can : be justified only by subclause 1.2 a).
does not state "clearly" one can freely put garbage in his/her source code provided that it is after the final "End." :-) I admire people like you who can see clearly something in a so cryptic text - at least for me -. This kind of things keeps me humble.
Thanks again.
Pascal Viandier
-----Message d'origine----- De : gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] De la part de Waldek Hebisch Envoyé : March 1, 2006 15:01 À : gpc@gnu.de Objet : Re: Reading source past end of block
I encountered an unexpected error with GPC when compiling a Pascal source
that
contains "some text" (not Pascal code) after the final "End." of the
program.
GPC tries to compile this extra text and finds syntax errors in it.
Although I did not see any reference to this in ISO 10206, I think it could
be a
nice feature for GPC to ignore everything after the final "End." in a
program or
a unit since nothing useful for it should be there.
-fignore-garbage-after-dot
There is reference in ISO 10206: see 6.13, especially rule for program-block. AFAICS the compiler is required to accept multi-module program in a single file. In particular Note 1 to 6.13 clarily states that "useless" modules may follow main program.
-- Waldek Hebisch hebisch@math.uni.wroc.pl