Xref: utzoo comp.lang.c:10299 comp.lang.fortran:683 Newsgroups: comp.lang.c,comp.lang.fortran Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: no noalias not negligible - a difference between C and Fortran - long Message-ID: <1988May23.000335.693@utzoo.uucp> Organization: U of Toronto Zoology References: <54080@sun.uucp> Date: Mon, 23 May 88 00:03:35 GMT Everyone agrees that the problem needs attention; unfortunately, there is no well-proven solution to it for C, and thus it is inappropriate to try to deal with it as part of standardization of the existing language. > ... Perhaps what will happen is that high-performance > C compilers will adopt the questionable CDC/Cray Fortran practice > of providing "unsafe" optimization levels that, for instance, > assume all pointers are unaliased. High-performance compilers will have to have *SOME WAY* to find out about aliasing or lack thereof. The obvious way is to have some sort of magic cookie in the source to selectively indicate when promises are made about aliasing. A compile-time option that covers a whole file isn't really a good idea, considering how pervasive pointers are in C and how common aliasing is. The obvious type of cookie is #pragma. (It is claimed, probably correctly, that #pragma technically is not allowed to change the semantics of the language, but that's not the way it will happen in the real world.) -- NASA is to spaceflight as | Henry Spencer @ U of Toronto Zoology the Post Office is to mail. | {ihnp4,decvax,uunet!mnetor}!utzoo!henry