*devaddr = 0 and volatile

Peter Desnoyers desnoyer at Apple.COM
Tue Dec 6 03:34:19 AEST 1988


In article <9059 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <14832 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>>I would suggest that the compiler complain about volatile references
>>that it cannot compile `properly'.
>
>Sounds like a reasonable suggestion to me.
>After all, if the programmer specified "volatile" it is safe to
>assume that he had a reason for doing so, and if it can't be honored
>then something is probably going to break.

The uncompilable example given was 'volatile char foo' on a
word-oriented machine. If 'foo' is a hardware register, methinks a
compiler error message is insufficient. You really should fire the
person who designed such a f***-up. It ranks up there with write-only
memory. 1/2 :-) 

				Peter Desnoyers



More information about the Comp.lang.c mailing list