public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/4] -Wmisleading-indentation
@ 2015-10-29 16:32 David Malcolm
  2015-10-29 16:32 ` [PATCH 2/4] Fix misleading indentation in tree-ssa-loop-unswitch.c David Malcolm
                   ` (4 more replies)
  0 siblings, 5 replies; 44+ messages in thread
From: David Malcolm @ 2015-10-29 16:32 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

The following patches:
  * tweak -Wmisleading-indentation to suppress a kind of false
    positive that occurred in three places in gcc's source
    tree, and 

  * fix the two remaining truly misleadingly-indented places
    where the warning fires

  * adds -Wmisleading-indentation to -Wall

Bootstrapped&regrtested the combination of patches with
x86_64-pc-linux-gnu; config-list.mk build using
gcc6 with -Wmisleading-indentation enabled is in-progress.

OK for trunk?

David Malcolm (4):
  -Wmisleading-indentation: don't warn in presence of entirely blank
    lines
  Fix misleading indentation in tree-ssa-loop-unswitch.c
  Fix misleading indentation in tree-nested.c
  Add -Wmisleading-indentation to -Wall

 gcc/c-family/c-indentation.c                       | 58 ++++++++++++++++++++++
 gcc/c-family/c.opt                                 |  2 +-
 gcc/doc/invoke.texi                                |  5 +-
 .../c-c++-common/Wmisleading-indentation.c         | 32 ++++++++++++
 gcc/tree-nested.c                                  | 42 ++++++++--------
 gcc/tree-ssa-loop-unswitch.c                       |  2 +-
 6 files changed, 116 insertions(+), 25 deletions(-)

-- 
1.8.5.3

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: [PATCH 4/4] Add -Wmisleading-indentation to -Wall
@ 2015-12-11 11:26 Dominique d'Humières
  2015-12-11 11:51 ` Iain Sandoe
  0 siblings, 1 reply; 44+ messages in thread
From: Dominique d'Humières @ 2015-12-11 11:26 UTC (permalink / raw)
  To: dmalcolm; +Cc: law, Iain Sandoe, gcc-patches

This breaks bootstrap on darwin:

../../work/gcc/config/darwin.c: In function 'bool darwin_use_anchors_for_symbol_p(const_rtx)':
../../work/gcc/config/darwin.c:3016:9: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
         return default_use_anchors_for_symbol_p (symbol);
         ^~~~~~

../../work/gcc/config/darwin.c:3012:7: note: ...this 'if' clause, but it is not
       if (sect->common.flags & SECTION_NO_ANCHOR)
       ^~

cc1plus: all warnings being treated as errors

Fixed by the following patch

--- ../_clean/gcc/config/darwin.c	2015-10-16 22:46:35.000000000 +0200
+++ gcc/config/darwin.c	2015-12-11 12:17:40.000000000 +0100
@@ -3012,8 +3012,8 @@ darwin_use_anchors_for_symbol_p (const_r
       if (sect->common.flags & SECTION_NO_ANCHOR)
 	return false;
 
-        /* Also check the normal reasons for suppressing.  */
-        return default_use_anchors_for_symbol_p (symbol);
+      /* Also check the normal reasons for suppressing.  */
+      return default_use_anchors_for_symbol_p (symbol);
     }
   else
     return false;

TIA

Dominique

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2015-12-11 16:48 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-29 16:32 [PATCH 0/4] -Wmisleading-indentation David Malcolm
2015-10-29 16:32 ` [PATCH 2/4] Fix misleading indentation in tree-ssa-loop-unswitch.c David Malcolm
2015-10-29 17:34   ` Jeff Law
2015-10-29 16:32 ` [PATCH 1/4] -Wmisleading-indentation: don't warn in presence of entirely blank lines David Malcolm
2015-10-29 17:33   ` Jeff Law
2015-10-29 17:38   ` Patrick Palka
2015-10-29 17:44     ` Patrick Palka
2015-10-29 17:50       ` Jeff Law
2015-10-29 17:56       ` Mike Stump
2015-10-29 17:56         ` Patrick Palka
2015-10-29 18:00           ` Mike Stump
2015-10-29 18:13     ` David Malcolm
2015-10-29 17:59   ` AW: " bernds_cb1
2015-10-29 16:32 ` [PATCH 4/4] Add -Wmisleading-indentation to -Wall David Malcolm
2015-10-29 17:42   ` Jeff Law
2015-10-30  9:16     ` Richard Biener
2015-11-01 22:06       ` Patrick Palka
2015-11-02 16:21         ` David Malcolm
2015-11-02 17:11           ` David Malcolm
2015-11-02 18:39           ` Patrick Palka
2015-11-02 19:35             ` David Malcolm
2015-11-02 20:35               ` Marc Glisse
2015-11-02 23:41               ` Jeff Law
2015-12-09 15:19                 ` [PATCH] Add levels to -Wmisleading-indentation; add level 1 " David Malcolm
2015-12-09 15:40                   ` Bernd Schmidt
2015-12-09 16:49                     ` David Malcolm
2015-12-09 17:19                       ` Pedro Alves
2015-12-09 17:34                       ` Bernd Schmidt
2015-12-10 15:25     ` [committed 1/5] Fix -Wmisleading-indentation warning in function.c David Malcolm
2015-12-10 15:25       ` [committed 3/5] Fix -Wmisleading-indentation warning in gcc/regrename.c David Malcolm
2015-12-10 15:25       ` [committed 5/5] Fix -Wmisleading-indentation warning in graphite-optimize-isl.c David Malcolm
2015-12-11 16:44         ` Sebastian Pop
2015-12-10 15:25       ` [committed 2/5] Fix misleading indentation in gcc/fortran/io.c David Malcolm
2015-12-10 15:25       ` [committed 4/5] Fix -Wmisleading-indentation warning in ifcvt.c David Malcolm
2015-12-10 15:33       ` [committed 1/5] Fix -Wmisleading-indentation warning in function.c David Malcolm
2015-12-10 18:25     ` [PATCH 4/4] Add -Wmisleading-indentation to -Wall David Malcolm
2015-10-29 16:32 ` [PATCH 3/4] Fix misleading indentation in tree-nested.c David Malcolm
2015-10-29 17:36   ` Jeff Law
2015-10-30  5:42 ` [PATCH 0/4] -Wmisleading-indentation Andi Kleen
2015-10-30  5:59   ` Jeff Law
2015-10-30 15:42   ` Mike Stump
2015-12-11 11:26 [PATCH 4/4] Add -Wmisleading-indentation to -Wall Dominique d'Humières
2015-12-11 11:51 ` Iain Sandoe
2015-12-11 16:48   ` Dominique d'Humières

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).