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

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
There's an alternate suggestion here:
https://www.reddit.com/r/programming/comments/47pejg/gcc_6_wmisleadingindentation_vs_goto_fail/d0eqyih

> This is just passive voice, there is nothing tricky about it.
> What I find more confusing -- and what your fix preserves -- is the
> reversed order of offending lines of code in the source file and the message.
> 
> I'd rather go with something like this:
> sslKeyExchange.c:629:4: warning: indentation of a statement below this 'if' 
> clause... [-Wmisleading-indentation]
>     if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
>     ^~
> sslKeyExchange.c:631:8: note: ...suggests it is guarded by the 'if' clause, 
> but it's not
>         goto fail;
>         ^~~~
> You can even see how the indentation is wrong in the very error message.

which suggests reversing the order of the messages, so that they appear in
source order.

Reply via email to