volatile, noalias and optimization

Lloyd Zusman ljz at fxgrp.fx.com
Sat Apr 23 14:20:50 AEST 1988


In article <132 at 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



More information about the Comp.lang.c mailing list