This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Wed, 14 Sep 2016 10:40:58 -0700
- Subject: Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context
- Authentication-results: sourceware.org; auth=none
- References: <AM4PR0701MB21624AB3DECA1269E4BBB475E4E50@AM4PR0701MB2162.eurprd07.prod.outlook.com> <4fd68972-b48b-560a-b8e2-ae7d607b9b87@redhat.com> <AM4PR0701MB216265F6259DAEEFB6C52AA0E4FF0@AM4PR0701MB2162.eurprd07.prod.outlook.com> <48602fe1-c295-fce5-a6fe-e7e259532f44@redhat.com> <AM4PR0701MB2162C05959D824E57DDC6B12E4FF0@AM4PR0701MB2162.eurprd07.prod.outlook.com> <AM4PR0701MB2162918E947B0A81ED74C940E4F10@AM4PR0701MB2162.eurprd07.prod.outlook.com>
- Reply-to: kargl at uw dot edu
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