From owner-freebsd-arch Thu Apr 27 12:25:55 2000 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 9A87637B590 for ; Thu, 27 Apr 2000 12:25:49 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id VAA02909 for ; Thu, 27 Apr 2000 21:25:43 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id VAA01505 for freebsd-arch@freebsd.org; Thu, 27 Apr 2000 21:25:42 +0200 (CEST) Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id AB50037BAA7 for ; Thu, 27 Apr 2000 12:23:36 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (qmail 15797 invoked from network); 27 Apr 2000 19:23:32 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 27 Apr 2000 19:23:32 -0000 Date: Fri, 28 Apr 2000 05:23:28 +1000 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Archie Cobbs Cc: obrien@freebsd.org, Brian Fundakowski Feldman , arch@freebsd.org Subject: Re: limits.h and styles; ANSIfication In-Reply-To: <200004271758.KAA66218@bubba.whistle.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 27 Apr 2000, Archie Cobbs wrote: > David O'Brien writes: > > > http://people.FreeBSD.org/~green/limits.patch > > > > Why are you removing the ()'s from the macros? They are there to protect > > the expansion and should stay. > > You don't need paretheses when C cannot possibly parse it any > other way.. eg "0xffff" is always the same as "(0xffff)" in C. > > It seems to me the paretheses were there previously to protect > the "-1" part. The -1 part is necessary to give the correct type. Parentheses are also necessary to protect unary minus in some contexts, e.g., -1["foo"] is the negation of the character at offset 1 in "foo", while (-1)["foo"] is the character at the (invalid) offset -1 in "foo". > As for > > #define QUAD_MIN (LONG_MIN) > > they're also unnecessary, inductively assuming the #definition of > LONG_MIN is itself suitably protected. I agree, but I can't see how to define QUAD_MIN correctly without using paretheses :-). The above gives it the wrong type (long instead of quad_t). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message