Re: bin/ln & WARNS=5

Dag-Erling Smorgrav <[email protected]> 15 Jul 2002 17:25:27 +0200
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
"M. Warner Losh" <[email protected]> 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 - [email protected]

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message