Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!ucsd!ucbvax!decwrl!decvax!tektronix!nosun!lfm.fpssun.fps.com!lfm From: lfm@fpssun.fps.com (Larry Meadows) Newsgroups: comp.lang.fortran Subject: Re: Fortran versus C for numerical analysis Summary: not required to catch it Message-ID: <316@lfm.fpssun.fps.com> Date: 13 Sep 88 21:23:41 GMT References: <408@marob.MASA.COM> <3417@lanl.gov> <410@marob.MASA.COM> Organization: Floating Point Systems Lines: 21 In article <410@marob.MASA.COM>, samperi@marob.MASA.COM (Dominick Samperi) writes: > [...] FORTRAN: "do not modify the same array > by two different aliases," since both rules have in common the fact that > the compiler will not make sure you obey them (though FORTRAN compilers > are supposed to catch this error, I haven't seen any that do). I know we have beaten this dead horse to death, but I just can't resist. The FORTRAN ANSI-77 standard says that the behavior in this case is undefined. It does not, repeat not, ..., repeat not state, imply, or suggest that a compiler is required to detect this error, any more than it is required to detect assignment to a constant passed as an actual parameter, different length common blocks with the same name, ad nauseum. What it means is that a standard-conforming compiler can assume that these rules are not violated and perhaps optimize the code better as a result. Of course, some of these rules are violated so often that compiler writers, to satisfy their users, must treat the violations as de facto extensions to the standard. -- Larry Meadows @ FPS ...!tektronix!fpssun!lfm ...!nosun!fpssun!lfm