*devaddr = 0 and volatile

Tim Olson tim at crackle.amd.com
Tue Dec 6 09:08:46 AEST 1988


In article <21686 at apple.Apple.COM> desnoyer at Apple.COM (Peter Desnoyers) writes:
| 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.

I was speaking to Richard Relph about this subject, and he brought up
the problem of unaligned accesses through a pointer to a volatile object
which is larger than a char, but is not properly aligned [what a
mouthful!].  These also require multiple accesses to be performed
"correctly."  What should be done here?

	-- Tim Olson
	Advanced Micro Devices
	(tim at crackle.amd.com)



More information about the Comp.lang.c mailing list