From owner-freebsd-audit Mon Jul 15 8:25:32 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAA7437B400; Mon, 15 Jul 2002 08:25:30 -0700 (PDT) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03BC943E5E; Mon, 15 Jul 2002 08:25:29 -0700 (PDT) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id A3086534B; Mon, 15 Jul 2002 17:25:27 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: "M. Warner Losh" Cc: keramida@FreeBSD.ORG, bde@zeta.org.au, freebsd-audit@FreeBSD.ORG Subject: Re: bin/ln & WARNS=5 References: <20020715112116.GE50130@hades.hell.gr> <20020715114437.GA51994@hades.hell.gr> <20020715.090542.07693309.imp@bsdimp.com> From: Dag-Erling Smorgrav Date: 15 Jul 2002 17:25:27 +0200 In-Reply-To: <20020715.090542.07693309.imp@bsdimp.com> Message-ID: Lines: 22 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "M. Warner Losh" writes: > : > There are two different cases - one is "sizeof(type)" which requires > : > parentheses, the other is "sizeof variable" which doesn't. In the > : > latter case, the rule about avoiding unnecessary parentheses applies. > That's not always the case. sizeof type always works too. No, "sizeof type" is a syntax error in C89 and C99. des@des ~% cat /tmp/sizeof.c int main(void) { int one = sizeof char; return one; } des@des ~% cc -o /dev/null /tmp/sizeof.c /tmp/sizeof.c: In function `main': /tmp/sizeof.c:4: syntax error before "char" DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message