On Sun, Apr 26, 2009 at 09:02:36AM +0200, Christoph Mallon wrote:
> 
> return with parentheses:
> Removed, because it does not improve maintainability in any way. There 
> is no source for confusion here, so the rule even contradicts the rule, 
> which states not to use redundant parentheses. Maybe, decades ago it was 
> just a workaround for a broken compiler, which does not exist anymore.

FYI, the idea behind this rule is said to be to able to use
a macro return(), f.e. for debugging you then can do:
#define return(x) do {                                                  \
        printf("returning from %s with %d\n", __func__, (x));           \
        return (x);                                                     \
} while (0)

Given the this is a nifty feature and parentheses around the
return value don't hurt maintainability in any way IMO this
rule should stay.

Marius

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to