This is the mail archive of the gcc-patches@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]

Re: [PATCH 4/4] Add -Wmisleading-indentation to -Wall


> 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


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