This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/4] Add -Wmisleading-indentation to -Wall
- From: Iain Sandoe <iain at codesourcery dot com>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: <dmalcolm at redhat dot com>, "law at redhat dot com" <law at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 11 Dec 2015 11:51:03 +0000
- Subject: Re: [PATCH 4/4] Add -Wmisleading-indentation to -Wall
- Authentication-results: sourceware.org; auth=none
- References: <2B637228-32FB-454E-BEB7-95A059A93A07 at lps dot ens dot fr>
> On 11 Dec 2015, at 11:25, Dominique d'HumiÃres <dominiq@lps.ens.fr> wrote:
>
> 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;
I think you can apply this as obvious
Iain