Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Re: Smart pointers and stupid people (was: garbage collection...) Message-ID: <70302@microsoft.UUCP> Date: 29 Jan 91 21:51:58 GMT References: <4127@osc.COM> <3344@lupine.NCD.COM> <4174@osc.COM> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Distribution: comp Organization: Microsoft Corp., Redmond WA Lines: 12 In article tom@ssd.csd.harris.com (Tom Horsley) writes: >This is the key point. No compiler with any brains keeps something in a >register across a function call where that something might be aliased. The >question then becomes, how does the compiler find out the thing is aliased? This is an interesting point in terms of optimization too. Conversely, no compiler with any brains flushes values needlessly from registers when optimization is turned on. The question then becomes: when is an object legitimately aliased by a function call, and when not? There isn't consensus in the C++ community of what constitutes a legitimate alias of an object. So, I guess compilers just have to pessimistically flush registers across function calls.... so much for C++ "optimization"