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: arithmetic underflow


Steve Kargl wrote:
> 2005-03-25  Steven G. Kargl  <kargls@comcast.net>
> 
>    * arith.c (check_result): Fix illogical logic.
> 
> OK for mainline and 4.0?

ok, except:

>  static arith
>  check_result (arith rc, gfc_expr * x, gfc_expr * r, gfc_expr ** rp)
>  {
> -  if (rc != ARITH_OK)
> -    gfc_free_expr (r);
> -  else
> -    {
> -      if (rc == ARITH_UNDERFLOW && gfc_option.warn_underflow)
> -        gfc_warning ("%s at %L", gfc_arith_error (rc), &x->where);
>  
> -      if (rc == ARITH_ASYMMETRIC)
> -	gfc_warning ("%s at %L", gfc_arith_error (rc), &x->where);
> +  arith val = rc;

It looks like you're adding an empty line before the declaration here.  ("diff
-cp" is more readable in cases where changes are interleaved like in this case
here, and it would make the blank line more obvious.)

Can you also add a testcase which checks for the warning?

Thanks,
- Tobi


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