GCC misleading indentation warning is disabled from this point onwards?

Viewed 6360

When compiling a rather large C++ project, I am getting this message:

note: -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

So, a few questions:

  • How bad is it that this warning is disabled?
  • What kind of things cause this to be disabled? Just the code being too large?
  • Is there a way to optimize/fix the code to prevent it from being disabled?
  • Is there a way to re-enable it despite the size of the code/headers?
  • Is there a way to silence the note about the warning being disabled?
1 Answers

How bad is it that this warning is disabled?

It has zero effect other than the obvious that you won't get warnings for code misleadingly indented from the point where the warning appeared.

What kind of things cause this to be disabled? Just the code being too large?

This GCC bug

Is there a way to optimize/fix the code to prevent it from being disabled?

Sure, but it'll require work that's wasted. Wait for the bugfix in gcc.

Is there a way to re-enable it despite the size of the code/headers?

It'll most likely re-enable itself if possible (when starting with a new translation unit).

Is there a way to silence the note about the warning being disabled?

I'd add -Wno-misleading-indentation for the time being. You can use also a different compiler if you have one installed.

Example, clang 8.0.0 does not give that warning:

scons -j12 platform=x11 use_llvm=yes target=release_debug

Related