Compilers and programming style (was Re: A question of style)

Walter Bright bright at Data-IO.COM
Tue Jan 9 06:58:43 AEST 1990


int *p;
*p;		/* has no side effects and should be optimized away,	*/
		/* a warning is justified here as it is probably a	*/
		/* mistake						*/

(void) *p;	/* has no side effects and should be optimized away,	*/
		/* no warning should be generated			*/

volatile int *p;
*p;		/* has side effects and must not be optimized away	*/



More information about the Comp.lang.c mailing list