Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2002 19:58:52 +0000 (GMT)
From:      Mike Silbersack <silby@silby.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/kern uipc_socket2.c
Message-ID:  <20020107194722.G31122-100000@patrocles.silby.com>
In-Reply-To: <20020107160807.V376-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, 7 Jan 2002, Bruce Evans wrote:

> On Sun, 6 Jan 2002, Mike Silbersack wrote:
>
> > As for the (?)min functions... why are they defined in libkern.h, rather
> > than types.h.  Isn't min a compiler builtin?
>
> Because they aren't types, and they aren't declared in a bogus place like
> the corresponding userland function MIN() (MIN is not a parameter, but is
> defined in param.h).  min isn't a compiler builtin.
>
> Bruce

Ah, that makes sense then.

If we use the simple macro
#define min(a,b) (((a)<(b))?(a):(b))
and a & b's types differ, does the compiler promote the lesser size to the
greater size for the purpose of the comparison, or does the comparison
occur only on the size of the lesser argument?

Mike "Silby" Silbersack


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020107194722.G31122-100000>