Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!iuvax!pur-ee!pur-phy!mrstve!mdbs!wsmith
From: wsmith@mdbs.UUCP (Bill Smith)
Newsgroups: comp.lang.c
Subject: volatile: how will it work here?
Keywords: volatile
Message-ID: <957@mdbs.UUCP>
Date: 21 Jun 88 17:47:38 GMT
References: <11837@mimsy.UUCP> <796@l.cc.purdue.edu> <1174@mcgill-vision.UUCP>
Reply-To: wsmith@mdbs.UUCP (Bill Smith)
Followup-To: comp.lang.c
Organization: Micro Database Systems, Inc., Lafayette IN
Lines: 17


What code will this program generate?:

volatile int avar;
main()
{
	avar;
}

As I understand it, the code should be something like:
	LD	R0,avar
	RET

How many compilers optimize this program because of its "lack of 
side-effects?"

Bill Smith	pur-ee!uiucdcs!wsmith	wsmith@cs.uiuc.edu