Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/whois




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@localhost>




Home | Main Index | Thread Index | Old Index