[Patch, fortran] PR28585: Add Fortran 2003 NEW_LINE intrinsic function

FX Coudert fxcoudert@gmail.com
Sun Oct 8 13:22:00 GMT 2006


Hi Tobias,

I commited your patch. Here are a few last remarks:

1. there was a warning when building with your patch:
trunk/gcc/fortran/simplify.c: In function ‘gfc_simplify_new_line’:
trunk/gcc/fortran/simplify.c:2621: warning: unused variable ‘index’

Some oddity in Make-lang.in specifies that simplify.c should be build  
with -Wno-error, that's why the build did not explode in your hands.  
In the patch I commited, I removed the declaration of unused variable  
index.

2. when submitting a patch, we need to know what is the extent of  
your testing. The usual minimal testing is "built and regression- 
tested on [build-triplet]", if you have run the testsuite for the  
freshly built compiler; for doc changes, you probably also want to  
"make info && make html" to be sure TeXinfo accepts your changes (and  
mention that).

3. there was still some non-NEW_LINE stuff in your intrinsic.texi  
diff; I applied only the relevant parts

4. bad style in your ChangeLog entry:

> 2006-10-08  Tobias Burnus  <burnus@net-b.de>
>
>      PR fortran/28585
>      * intrinsic.c(add_functions): Add new_line Fortran 2003 intrinsic
>        intrinsic.h: Add gfc_simplify_new_line and  
> gfc_check_new_line prototypes
>        check.c: Add gfc_check_new_line
>        simplify.c: Add gfc_simplify_new_line
>      * intrinsic.text: Document new_line intrinsic
>      * gfortran.dg/new_line.f90: new testcase

The "perfect style" would be, I guess:

2006-10-08  Tobias Burnus  <burnus@net-b.de>

         PR fortran/28585
         * intrinsic.c (add_functions): Add new_line Fortran 2003  
intrinsic.
         * intrinsic.h: Add gfc_simplify_new_line and gfc_check_new_line
         prototypes.
         * check.c (gfc_check_new_line): New function.
         * simplify.c (gfc_simplify_new_line): New function.
         * intrinsic.texi: Document new_line intrinsic.

2006-10-08  Tobias Burnus  <burnus@net-b.de>

         PR fortran/28585
         * gfortran.dg/new_line.f90: New test.

That is: tabs for left spacing, * for each file, function names  
modified or added inside parentheses, separate ChangeLog entries for  
front-end, library and testsuite.


I attach the diff I commited as revision 117555. Thanks again, Tobias!

FX

-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_line.diff
Type: application/octet-stream
Size: 5926 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061008/4a99d0b6/attachment.obj>


More information about the Fortran mailing list