[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std

thenlich at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 27 09:15:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948

--- Comment #2 from Thomas Henlich <thenlich at gcc dot gnu.org> ---
-fall-intrinsics is a nice workaround, but it also enables more than I want.

I just find it not intuitive, that -fdec apparently has the same effect as
-fall-intrinsics for some intrinsics, but -fdec-math (an option to actually
enable some intrinsics) does not.

As documented:

"-fall-intrinsics
This option causes all intrinsic procedures (including the GNU-specific
extensions) to be accepted."

Just not those which require -fdec or -fdec-math.

"-fdec-math
Enable legacy math intrinsics such as COTAN and degree-valued trigonometric
functions (e.g. TAND, ATAND, etc...) for compatability with older code."

Requiring one of -fdec or -fall-intrinsics, if -std is specified. Is redundant
in the first case.

Any plan for action regarding this option should probably consider the fact
that decimal trigonometry functions are on the work list for Fortran 202X,
which if passed would leave only COTAN as a non-standard function.


More information about the Gcc-bugs mailing list