Path: utzoo!attcan!uunet!husc6!bu-cs!buengc!art From: art@buengc.BU.EDU (A. R. Thompson) Newsgroups: comp.lang.pascal Subject: Re: Control variables in FOR loops Message-ID: <1806@buengc.BU.EDU> Date: 28 Dec 88 23:16:31 GMT References: <1439@csuna.UUCP> <45@csd4.milw.wisc.edu> <1771@buengc.BU.EDU> <3693@s.cc.purdue.edu> <1804@buengc.BU.EDU> Reply-To: art@buengc.bu.edu (A. R. Thompson) Followup-To: comp.lang.pascal Organization: Boston Univ. Col. of Eng. Lines: 38 Hi Al! I read comp.lang.pascal, but presently can't respond directly. I just noticed the following: ----------------------------------- In article <3693@s.cc.purdue.edu> ags@s.cc.purdue.edu (Dave Seaman) writes: >In article <1771@buengc.BU.EDU> art@buengc.bu.edu (A. R. Thompson) writes: >>Ah, but since you've already established that it's an illegal program you >>can no longer predict what will happen. That's strictly up to the >>compiler writer (who is duty bound to report the error and refuse to >>generate executable code). > >Not so. The compiler writer is free to do whatever he likes, provided the >accompanying documentation describes the types of errors that are not >reported by the compiler. > While the standard may allow this I take exception to it in cases like this. ----------------------------------- In fact, the compiler writer is NOT "free to do whatever he likes" if she is writing a standards-conforming compiler. Most of the restrictions under discussion are not "errors" (as defined in the standard), and thus a conforming processor (compiler) MUST detect violations of those restrictions. It is only those restrictions explicitly defined by the standard as "errors" or "implementation-dependent" for which detection is optional. Please forward this to the net. Regards, Jim Miner