Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!fxgrp!ljz From: ljz@fxgrp.fx.com (Lloyd Zusman) Newsgroups: comp.lang.c Subject: Re: volatile, noalias and optimization Message-ID: <279@fxgrp.UUCP> Date: 23 Apr 88 04:20:50 GMT References: <20345@pyramid.pyramid.com> <132@atpal.UUCP> Sender: news@fxgrp.UUCP Reply-To: ljz@fx.com (Lloyd Zusman) Organization: Master Byte Software, Los Gatos, California Lines: 33 In article <132@atpal.UUCP> uunet!pwcmrd!skipnyc!atpal!tneff (Tom Neff) writes: >It's been pointed out at some length that the new /volatile/ and /noalias/ >keywords are really all about controlling the optimizer in various C >implementations, more than about the language itself. > ... > ... but shouldn't we use > > #pragma volatile(var1, var2, var3) > > ... And ditto for /noalias/ ... > > #pragma noalias(var4, var5) > > ... Hear hear! This way, those of us who really want one or the other of these constructs could use them all we want, and those others who don't want the namespace cluttered can be happy, too. Of course, we'll probably see a few postings from some C Fundamentalists that try to tell us how we should never write code that needs either of these. I think the term "Fundamentalists" is apt, as these folks aren't satisfied with their own programming holiness, but they feel they have to force the rest of us to program in accordance with their (often misguided) beliefs. Oh well ... that's life on the net. I also presume that the ANSI committee won't follow this excellent suggestion, either (sigh). -- Lloyd Zusman Master Byte Software