This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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 09/14/16 19:40, Steve Kargl wrote:
> 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.
>

OK, thanks, then I will go ahead and commit that one as obvious.


Bernd.


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