-Wmisleading-indentation

Post by Nico Brailovsky @ 2018-09-30 | Permalink | Leave a comment

This gcc switch is a few years old but I discovered it recently. I'm not sure if that means my code is always very clean or my toolchain too oudated... in any case, -Wmisleading-indentation (which you get with -Wall) warns about this gotcha:

if (foo)
   bar();
   baz();

Neat!