From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Ralph Corderoy Message-ID: References: , <3C7CFAFE.4996DA2A@research.bell-labs.com>, <87u1s2y1uu.fsf@becket.becket.net> Subject: Re: [9fans] plan or side effect Date: Thu, 28 Feb 2002 12:51:06 +0000 Topicbox-Message-UUID: 5bb82e0e-eaca-11e9-9e20-41e7f4b1d025 Hi Thomas, > Well, that's a bug, certainly. GCC does not make such assumptions. > > More specifically, the canonical copy of a global is stored in > memory, and all function calls are assumed to dirty all of memory. It doesn't have special knowledge of some functions behaviour then, like AIX's xlc compiler? For example, #defines strlen(s) to be __strlen(s) and the compiler knows that calls to __strlen can be optimised in various ways because it knows more about strlen's behaviour than can be expressed in . Ralph.