Re:GCC 6: -Wmisleading-indentation vs. “goto fail;”
by slizard on Friday February 26, 2016 @12:22PM
(#11182599)
In the project I work on our style also requires block-parens. Sometimes it feels unnecessary, but it does make up in terms of consistency: it's easy to glance through the code and inspect the conditions only.
I got used to this quite a bit and these days if I write code outside the project I work on, I d sometimes omit the block-parens, but I always add extra indentation to ensure the condition is visually well-separated, e.g.:
if (condition1 || condition2) execute_foo1(with_bar);
if (condition3) exectute_foo2();
I got used to this quite a bit and these days if I write code outside the project I work on, I d sometimes omit the block-parens, but I always add extra indentation to ensure the condition is visually well-separated, e.g.: