[Bug c/66298] -Wmisleading-indentation should also detect missing indentation

fw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 26 18:59:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66298

--- Comment #1 from Florian Weimer <fw at gcc dot gnu.org> ---
Other examples.  All should receive warnings.

  while (check_something())
    // do_something(); (commented out)
  do_something();

  if (check_something())
#include "/dev/null"
  do_something();

  if (check_something())
#define MACRO
  do_something();

  if (check_something())
#pragma GCC poison ignored
  do_something();

(#pragma is tricky; they sometimes count as statements, I think.)


More information about the Gcc-bugs mailing list