aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-indentation.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@gcc.gnu.org>2015-09-24 01:55:59 +0000
committerPatrick Palka <ppalka@gcc.gnu.org>2015-09-24 01:55:59 +0000
commit6b95d7cc2d5ba73f698a4f0439cdff2145583df2 (patch)
tree81efc45344b5a09e6935be720cf7c69891d47ab4 /gcc/c-family/c-indentation.c
parent3d5cda1290ec317a868fe7462e1f67f130cbac69 (diff)
downloadgcc-6b95d7cc2d5ba73f698a4f0439cdff2145583df2.zip
gcc-6b95d7cc2d5ba73f698a4f0439cdff2145583df2.tar.gz
gcc-6b95d7cc2d5ba73f698a4f0439cdff2145583df2.tar.bz2
Fix a -Wmisleading-indentation false-negative
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: * c-c++-common/Wmisleading-indentation.c: Augment test. From-SVN: r228071
Diffstat (limited to 'gcc/c-family/c-indentation.c')
-rw-r--r--gcc/c-family/c-indentation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-indentation.c b/gcc/c-family/c-indentation.c
index 5316316..5b119f7 100644
--- a/gcc/c-family/c-indentation.c
+++ b/gcc/c-family/c-indentation.c
@@ -464,7 +464,7 @@ should_warn_for_misleading_indentation (const token_indent_info &guard_tinfo,
{
if (next_stmt_vis_column > guard_line_first_nws
|| (next_tok_type == CPP_OPEN_BRACE
- && next_stmt_vis_column == guard_vis_column))
+ && next_stmt_vis_column == guard_line_first_nws))
return true;
}
}