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] PR28585: Add Fortran 2003 NEW_LINE intrinsic function


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


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