PR c/66220: Fix false positive from -Wmisleading-indentation
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 2 Jun 2015 18:45:50 +0000 (18:45 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 2 Jun 2015 18:45:50 +0000 (18:45 +0000)
commit6ac481556e7ce457d72eb44b9a07db3fae63ed8a
tree978f85d03f17cc62ee6d5c54d34589c0e09a0def
parent773ce42e90609a47d648eed62afc05a2f309f300
PR c/66220: Fix false positive from -Wmisleading-indentation

gcc/c-family/ChangeLog:
PR c/66220:
* c-indentation.c (should_warn_for_misleading_indentation): Use
expand_location rather than expand_location_to_spelling_point.
Don't warn if the guarding statement is more indented than the
next/body stmts.

gcc/testsuite/ChangeLog:
PR c/66220:
* c-c++-common/Wmisleading-indentation.c (fn_35): New.
(fn_36): New.

From-SVN: r224041
gcc/c-family/ChangeLog
gcc/c-family/c-indentation.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wmisleading-indentation.c