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, updated] Add a warning for suspicious use of conditional expressions in boolean context


On Wed, Sep 14, 2016 at 04:10:46PM +0000, Bernd Edlinger wrote:
> 
> fortran:
> 2016-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
> 
> 	PR c++/77434
> 	* simplify.c (gfc_simplify_repeat): Fix a warning.
> 
> Index: gcc/fortran/simplify.c
> ===================================================================
> --- gcc/fortran/simplify.c	(revision 240135)
> +++ gcc/fortran/simplify.c	(working copy)
> @@ -5127,7 +5127,7 @@ gfc_simplify_repeat (gfc_expr *e, gfc_expr *n)
>  
>    if (len ||
>        (e->ts.u.cl->length &&
> -       mpz_sgn (e->ts.u.cl->length->value.integer)) != 0)
> +       mpz_sgn (e->ts.u.cl->length->value.integer) != 0))
>      {
>        const char *res = gfc_extract_int (n, &ncop);
>        gcc_assert (res == NULL);

This part should be committed regardless of the
outcome of a review of the complete patch.  The
closing ')' is clearly missed placed.

-- 
Steve


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