Re: [PATCH] Fix a -Wmisleading-indentation false-negative

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 03:37 AM, Patrick Palka wrote: gcc/c-family/ChangeLog: * c-indentation.c (should_warn_for_misleading_indentation): Compare next_stmt_vis_column with guard_line_first_nws instead of with guard_line_vis_column. gcc/testsuite/ChangeLog: *

[PATCH] Fix a -Wmisleading-indentation false-negative

2015-09-22 Thread Patrick Palka
We currently correctly emit a -Wmisleading-indentation warning for the code ... if (flagB); { foo (); } but we fail to emit a warning for the syntactically similar code ... else if (flagB); { foo (); } because in the heuristic in question we are inspecting the column of