Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: `noalias' vs `register' Message-ID: <6895@brl-smoke.ARPA> Date: 21 Dec 87 08:55:41 GMT References: <8712170057.AA17035@decwrl.dec.com> <6858@brl-smoke.ARPA> <2270@dasys1.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 Keywords: noalias ANSI In article <2270@dasys1.UUCP> jsb@dasys1.UUCP (Jim Baumbach) writes: >Before the invention of volatile, all variables were potentially volatile >and optimizers which treated them otherwise were WRONG. No, there was simply no guarantee one way or the other. Some flavors of PCC had a special hack that detected a probable reference to a Unibus device register and disabled optimizations for the expression containing it, much as "volatile" now does. The original (Ritchie) PDP-11 C compiler didn't do enough optimization for this to ever be an issue. (Of course, it didn't need to; the PDP-11 instruction set and C were a close match.)