Re: for-loops and subrange types

Phil Nelson <[email protected]>
Newsgroups gmane.comp.compilers.gpc
Organization Western Washington University
Message-ID <[email protected]>
On Friday 26 April 2013 12:01:34 pm Jonas Maebe wrote:
> Can anyone here offer some insights regarding the standard conformance of the test program submitted at http://bugs.freepascal.org/view.php?id=24318 ? (range.p)
> 
> Both FPC and GPC cause the program to abort with a range check error, while the submitter is of the opinion that the for-loop should merely short-circuit and never executed instead.
> 

This program is clearly how I expect pascal to work.   If the
initial value is already past the final value, it should just
do nothing.

I can't speak directly to the standards, but if the require this
to be a range error, the standards clearly broke many of my
pascal programs.

I also verified that a very old version of gcp (2.95.3) did not
cause a range error on this kind of construct.

--Phil

-- 
Phil Nelson (phil at cs.wwu.edu) http://www.cs.wwu.edu/nelson
NetBSD: http://www.NetBSD.org  Coda: http://www.coda.cs.cmu.edu


_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.