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/68187] [6 Regression] Poor error message from -Wmisleading-indentation on glibc's ../stdlib/strtol_l.c


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

--- Comment #7 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Fri Mar  4 15:45:19 2016
New Revision: 233971

URL: https://gcc.gnu.org/viewcvs?rev=233971&root=gcc&view=rev
Log:
PR c/68187: fix overzealous -Wmisleading-indentation (comment #0)

gcc/c-family/ChangeLog:
        PR c/68187
        * c-indentation.c (should_warn_for_misleading_indentation): When
        suppressing warnings about cases where the guard and body are on
        the same column, only use the first non-whitespace column in place
        of the guard token column when dealing with "else" clauses.
        When rejecting aligned BODY and NEXT, loosen the requirement
        from equality with the first non-whitespace of guard to simply
        that they not be indented relative to it.

gcc/testsuite/ChangeLog:
        PR c/68187
        * c-c++-common/Wmisleading-indentation.c (fn_40_a): New test
        function.
        (fn_40_b): Likewise.
        (fn_41_a): Likewise.
        (fn_41_b): Likewise.


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]