Hi!

I wonder what the preferred style of return statments is -- for
returning simple values, both styles

        return foo;

and

        return (foo);

are used in the sources everythen and now. For me, the latter hurts
my eyes, since return just expects an rvalue which doesn't need
brackets (except for more complex expressions that actually need
brackets).

In addition, return statements in void functions are just

        return;

and not

        return ();

(which wouldn't be syntactically correct)

Simplified, the syntax is something like

return_stmt::   RETURN ';'
        |       RETURN expr ';'
        ;

So why do so many people put brackets around the returned expression?
And what's the preferred style for OpenBSD?

Ciao,
        Kili

-- 
Windows is so bootyful...

Reply via email to