This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] PR 16917: Add DFLOAT to gfortran
On Wed, Aug 11, 2004 at 05:16:17PM +0100, Paul Brook wrote:
>
> Steven B pointed out that it would be simpler to just add dfloat as an alias
> for dble. This means we accept a wider range of arguments to dfloat, but I
> don't imagine anyone's going to be bothered about that.
>
(snip)
>
> + make_alias ("dfloat");
> +
> make_generic ("dble", GFC_ISYM_DBLE);
>
I originally did the above patch, but changed my mind
because you are technically no longer compatible with
g77, f2c, and f77 on HP-UX. There may be other vendor
compilers that support DFLOAT. In all cases, the input
to DFLOAT is restricted to a scalar integer argument.
Thus, the following will fail with g77 et al
program d
real :: x(3) = 1.2e0
print *, dfloat(x)
end
but gfortran with your patch will now compile the above.
Additionally, I plan to add a warning in gfc_check_dfloat
if -std is set. I, however, need to determine how
gfc_notify_std () works. I think we should issue something
like "Extension: DFLOAT() is a nonstandard intrinsic. Consider
using DBLE()." 'make_alias ("dfloat");' does not permit this
type of checking.
--
Steve