From owner-freebsd-current Wed Apr 10 5:45:33 2002 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 5AE7C37B419; Wed, 10 Apr 2002 05:45:25 -0700 (PDT) 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 WAA27251; Wed, 10 Apr 2002 22:45:17 +1000 Date: Wed, 10 Apr 2002 22:45:28 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Alexander Leidinger Cc: obrien@FreeBSD.ORG, Subject: Re: libkern/quad.h In-Reply-To: <200204100945.g3A9j1HA000728@Magelan.Leidinger.net> Message-ID: <20020410223615.B264-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 10 Apr 2002, Alexander Leidinger wrote: > As for other occourences of the use of __GNUC__ without a check if it is > defined: I will wrap them as soon as I review my own patches again. Other occurrences are mostly correct. __GNUC__ is 0 in cpp expressions if it is used without it being defined. The problem with the ifdef in quad.h is that it defaults to the gcc-1 case if __GNUC__ is not >= 2. The ifdef should have been written something like: #if __GNUC__ == 1 typedef u_quad_t qshift_t; #else typedef u_int qshift_t; #endif assuming that u_int really is "correct" for shift counts. (Shift counts can be of any integer type; it is just not useful to use a large type for them since shifting by an amount larger than the number of bits in the operand being shifted is undefined.) Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message