C and real hardware - (nf)

utzoo!decvax!harpo!eagle!mhuxt!mhuxj!mhuxa!mhb5b!mjs utzoo!decvax!harpo!eagle!mhuxt!mhuxj!mhuxa!mhb5b!mjs
Mon May 2 00:15:22 AEST 1983


Hey folks, any compiler which "hyperoptimizes" the memory reference out
of the statement

	while (strptr->smember & CONST)
		;

is not a C compiler.  The semantics of that statement are that the
expression is evaluated until it is not true.  Evaluation of the
expression implies evaluating "strptr->smember".  This must be done for
every iteration of the loop.  If your compiler doesn't evaluate the
structure reference every time through the loop, it just ain't a C
compiler!

		Martin Shannon, Jr.
Phone:		(201) 582-3199
Internet:	mjs at mhb5b.uucp
UUCP:		{allegra,rabbit,alice,mhb5b,mhb5c}!mjs



More information about the Comp.lang.c mailing list