Unnecessary parentheses (Was: Help: VAX C problem)

Doug Gwyn gwyn at smoke.brl.mil
Tue Apr 16 07:33:11 AEST 1991


In article <3176 at oucsace.cs.OHIOU.EDU> sadkins at oucsace.cs.OHIOU.EDU (Scott W. Adkins) writes:
>In this case, they do not indicate that one is a function and the other is 
>an operator.

sizeof is always a unary operator keyword, never a function name.
It can be validly used in two distinct ways:
	sizeof unary_expression
	sizeof ( type_name )

Some people put parentheses around the innards of their unary_expression,
but they are not required.  (Same as for the operand of "return".)



More information about the Comp.lang.c mailing list