This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR28585: Add Fortran 2003 NEW_LINE intrinsic function
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: Tobias Burnus <burnus at net-b dot de>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 7 Oct 2006 09:08:27 -0700
- Subject: Re: [Patch, fortran] PR28585: Add Fortran 2003 NEW_LINE intrinsic function
- References: <4504A704.70502@net-b.de> <450F010F.6080701@net-b.de> <451AFCC8.4060602@net-b.de> <BA54FB26-AEA1-4D02-9594-5012D47F7CB2@gmail.com>
On Sat, Oct 07, 2006 at 05:44:56PM +0200, FX Coudert wrote:
>
> Sorry for this late review. Here are comments on your patch (although
> some doc changes are mixed with it):
Whoops. I think I had promise to look at this. FX, thanks for
picking it up.
> >>Index: gcc/fortran/intrinsic.c
> >>===================================================================
> >>--- gcc/fortran/intrinsic.c (Revision 117031)
> >>+++ gcc/fortran/intrinsic.c (Arbeitskopie)
> >>@@ -1881,6 +1881,10 @@
> >>
> >> make_generic ("nearest", GFC_ISYM_NEAREST, GFC_STD_F95);
> >>
> >>+ add_sym_1 ("new_line", 1, 1, BT_CHARACTER, dc, GFC_STD_F2003,
> >>+ gfc_check_new_line, gfc_simplify_new_line, NULL,
> >>+ a, BT_CHARACTER, dc, REQUIRED);
> >>+
> >> add_sym_2 ("nint", 1, 1, BT_INTEGER, di, GFC_STD_F77,
> >> gfc_check_a_ikind, gfc_simplify_nint, gfc_resolve_nint,
> >> a, BT_REAL, dr, REQUIRED, kind, BT_INTEGER, di, OPTIONAL);
>
> The first two args to add_sym_1 determine whether the function is
> elemental, and whether it is allowed as an actual argument. Here,
> they should both be 0. Admittedly, they were not used until recently,
> and most functions set them wrong (but I corrected that a few hours
> ago).
>
Should we add ELEMENTAL_YES and ACTUAL_YES (and the _NO forms)?
I could never remember if 1 was REQUIRED or OPTIONAL, which is
why gfortran now use those tokens.
--
Steve