(volatile) foo

Bakul Shah bvs at light.uucp
Mon Sep 18 04:07:20 AEST 1989


Is the following legal?

	char * foo;
	while ((volatile)foo)
		continue;

If legal, what does (volatile)foo mean -- is it
(volatile char *)foo or (volatile int)foo?  The former
would be more useful.  The spec seems to say it is
legal but I can not find anything about its meaning.

BTW, is anyone working on a denotational semantics
definition of ANSI C (or a major subset of it)?  Don't
laugh.

Thanks!

-- Bakul Shah <..!{ames,sun,ucbvax,uunet}!amdcad!light!bvs>



More information about the Comp.std.c mailing list