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,Fortran] PR40675: Fix SIGN for negative zero


Steve Kargl wrote:
> See the audit trail in the PR.  I'd prefer the two testcases
> I added to the PR instead of the one you included here.
Done. They are better than mine.

> As a final comment, gfortran should probably include -fsign-zero
> under the -std=legacy option.
>   
I personally prefer if they do not. I see -std=legacy as option which
allows more constructs - especially those of questionable meaning; but I
do not see it as something which changes the behaviour behind the
scenes. There is an extra option for this and thus I do not see a reason
for setting it explicitly.

I committed now my fortran/* patch together with your two testcases as
Rev. 149390. If you insists on -std=legacy, I think it can be committed
as follow up patch, where the changed flags should be documented in
invoke.texi.

Tobias

> Index: options.c
> ===================================================================
> --- options.c   (revision 149287)
> +++ options.c   (working copy)
> @@ -854,6 +854,7 @@ gfc_handle_option (size_t scode, const c
>  
>      case OPT_std_legacy:
>        set_default_std_flags ();
> +      gfc_option.flag_sign_zero = 0;
>        gfc_option.warn_std = 0;
>        break;
>
> OK after consideration for my comments


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