summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-indentation.c
diff options
context:
space:
mode:
authorppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-24 01:55:59 +0000
committerppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-24 01:55:59 +0000
commita3c82f4cb527bc2be8951db99e4cbf4ae847481a (patch)
tree81efc45344b5a09e6935be720cf7c69891d47ab4 /gcc/c-family/c-indentation.c
parentbeacf5fd58d84aa007c109d22ca9bf941f6f4b81 (diff)
downloadgcc-a3c82f4cb527bc2be8951db99e4cbf4ae847481a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228071 138bc75d-0d04-0410-961f-82ee72b054a4
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 5316316da78..5b119f790f0 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;
}
}