[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 #11 from David Malcolm --- Author: dmalcolm Date: Fri Mar 11 19:54:43 2016 New Revision: 234146 URL: https://gcc.gnu.org/viewcvs?rev=234146&root=gcc&view=rev Log: Wmisleading-indentation.c: add more test cases for PR c/68187 gcc/testsuite/ChangeLog: PR c/68187 * c-c++-common/Wmisleading-indentation.c (test43_a): New test case. (test43_b): Likewise. (test43_c): Likewise. (test43_d): Likewise. (test43_e): Likewise. (test43_f): Likewise. (test43_g): Likewise. (test44_a): Likewise. (test44_b): Likewise. (test44_c): Likewise. (test44_d): Likewise. (test44_e): Likewise. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/Wmisleading-indentation.c
[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 #10 from David Malcolm --- Author: dmalcolm Date: Fri Mar 11 19:48:49 2016 New Revision: 234145 URL: https://gcc.gnu.org/viewcvs?rev=234145&root=gcc&view=rev Log: Wmisleading-indentation: add reproducer for PR c/70085 PR c/70085 reported a false-positive from -Wmisleading-indentation. The warning was fixed by the fix for PR c/68187 (r233972), but it seems worth capturing the reproducer for PR c/70085 as an additional test case, as it's slightly different to those seen in PR c/68187. gcc/testsuite/ChangeLog: PR c/70085 * c-c++-common/Wmisleading-indentation.c (pr70085): New test case. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/Wmisleading-indentation.c
[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 David Malcolm changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from David Malcolm --- Both issues should be fixed as of r233972; marking as resolved.
[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 #8 from David Malcolm --- Author: dmalcolm Date: Fri Mar 4 15:50:27 2016 New Revision: 233972 URL: https://gcc.gnu.org/viewcvs?rev=233972&root=gcc&view=rev Log: PR c/68187: fix overzealous -Wmisleading-indentation (comment #1) gcc/c-family/ChangeLog: PR c/68187 * c-indentation.c (get_visual_column): Move code to determine next tab stop to... (next_tab_stop): ...this new function. (line_contains_hash_if): Delete function. (detect_preprocessor_logic): Delete function. (get_first_nws_vis_column): New function. (detect_intervening_unindent): New function. (should_warn_for_misleading_indentation): Replace call to detect_preprocessor_logic with a call to detect_intervening_unindent. gcc/testsuite/ChangeLog: PR c/68187 * c-c++-common/Wmisleading-indentation.c (fn_42_a): New test function. (fn_42_b): Likewise. (fn_42_c): 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
[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 --- 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
[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 #6 from David Malcolm --- Candidate patches posted: https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00260.html https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00261.html
[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 David Malcolm changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |dmalcolm at gcc dot gnu.org
[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 #5 from David Malcolm --- (In reply to Richard Biener from comment #4) > Confirmed. This bug is arguably two different issues: the one in comment #0 and the one in comment #1. Richi: I see that you confirmed this and raised the priority from P3 to P1. Were you referring to both issues, or just to one of them? (fwiw, I believe I have a fix for the issue in comment #0, but not yet for the one in comment #1)
[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 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Status|UNCONFIRMED |NEW Last reconfirmed||2016-03-01 Ever confirmed|0 |1 --- Comment #4 from Richard Biener --- Confirmed.
[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 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic Target Milestone|--- |6.0 Summary|Poor error message from |[6 Regression] Poor error |-Wmisleading-indentation on |message from |glibc's |-Wmisleading-indentation on |../stdlib/strtol_l.c|glibc's ||../stdlib/strtol_l.c