This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/66220] -Wmisleading-indentation false/inconsistent warning


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

--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Tue Jun  2 18:45:50 2015
New Revision: 224041

URL: https://gcc.gnu.org/viewcvs?rev=224041&root=gcc&view=rev
Log:
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.


Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-indentation.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/c-c++-common/Wmisleading-indentation.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]