prev up next   top/contents search

comp.lang.c FAQ list · Question 20.19

Q: Are the outer parentheses in return statements really optional?

A: Yes.

Long ago, in the early days of C, they were required, and just enough people learned C then, and wrote code which is still in circulation, that the notion that they might still be required is widespread.

(As it happens, parentheses are optional with the sizeof operator, too, under certain circumstances.)

References: K&R1 Sec. A18.3 p. 218
ISO Sec. 6.3.3, Sec. 6.6.6
H&S Sec. 8.9 p. 254

prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North