On Tue, 26 Jan 2016, David Malcolm wrote:
> [see the notes at https://gcc.gnu.org/ml/gcc/2016-01/msg00224.html on
> what -Wmisleading-indentation ran into on a mass-rebuild of Debian]
> 
> I put it apart from the existing headings as it relates to both C and to
> C++.

Thanks for thinking of the web pages for our users, David.

Ok, but please consider the following two bits of feedback:

  +The best fix is usually to fix the indentation of the code to match
  +the block structure, or to fix the block structure by adding missing
  +braces.  

Is it really fixing the block structure by adding braces in all cases?

If we have

    if( ... )
  did();

making this

    if( ... ) {
  did(); }

would not really fix the block structure (since it wouldn't change
it), would it?

  ...If changing the source is not practical or desirable (e.g. for
  +autogenerated code, or to avoid churn in the source history), the
  +warning can be disabled by adding <code>-Wno-misleading-indentation</code>
  +to the build flags.

The term "build flags" may be a bit ambiguous here (in the larger
context of GCC).  How about "...disabled via the...command-line 
option" or something like this?

Gerald

Reply via email to