Subject: Re: CVS commit: src/usr.bin/whois
To: Bill Studenmund <wrstuden@netbsd.org>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: source-changes
Date: 10/16/2003 14:35:56
On Thursday, October 16, 2003, at 01:32  PM, Bill Studenmund wrote:

> Note that server is declared static, so it will stick around, no? Thus 
> if
> GCC is producing the same code, it's doing something wrong. Either it's
> storing when it shouldn't now, or before it wasn't storing when it 
> should.

No.  The compiler is doing the right thing.  It knows that err() does 
not return, and so is able to determine that server will always get the 
value of nserver, and that err() will not be able to use the value of 
server or nserver (because of their scope), and thus eliminates the 
temp.

I would have been troubled if the compiler *didn't* generate the same 
code.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>