Date: 15 Jul 2002 17:25:27 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: "M. Warner Losh" <imp@bsdimp.com> Cc: keramida@FreeBSD.ORG, bde@zeta.org.au, freebsd-audit@FreeBSD.ORG Subject: Re: bin/ln & WARNS=5 Message-ID: <xzpn0st6mjc.fsf@flood.ping.uio.no> In-Reply-To: <20020715.090542.07693309.imp@bsdimp.com> References: <20020715112116.GE50130@hades.hell.gr> <xzpsn2l8bob.fsf@flood.ping.uio.no> <20020715114437.GA51994@hades.hell.gr> <20020715.090542.07693309.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"M. Warner Losh" <imp@bsdimp.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpn0st6mjc.fsf>