From owner-cvs-all Wed Jan 9 16:51:41 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D2BB737B400; Wed, 9 Jan 2002 16:51:28 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id LAA18882; Thu, 10 Jan 2002 11:51:19 +1100 Date: Thu, 10 Jan 2002 11:52:06 +1100 (EST) From: Bruce Evans X-X-Sender: To: Mike Silbersack Cc: , Subject: Re: cvs commit: src/sys/kern uipc_socket2.c In-Reply-To: <20020109124252.F2484-100000@patrocles.silby.com> Message-ID: <20020110115017.D10376-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 9 Jan 2002, Mike Silbersack wrote: > On Tue, 8 Jan 2002, Bruce Evans wrote: > > The compiler always promotes types (not sizes) in binary expressions. > > This works right for comparison except when the operand types have the > > same size but differ in signedness. The problem with the min() and > > MIN() macros is that they evaluate their args more than once. > > Ah, I can see the potential problems with signedness. As for the > evaluation of arguments; wouldn't the inline min functions in libkern.h do > the same? No, because inline functions have function semantics. Functions don't reevaluate their args. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message