[Patch, fortran] PR37159

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Sun Aug 24 09:58:00 GMT 2008


Hi Dennis,

Dennis Wassel wrote:
> here my first ever attempt at submitting a patch!
> I'll start an overnight bootstrap and regression test on GNU
> x86-32(-virtualbox)-linux and until then -well- look forward to some
> tutoring :-)

Let's start with some formalities.  Please accompany a patch with a 
ChangeLog entry, see the ChangeLog files for the correct format.  Also, 
please always include testcases that verify that whatever you're doing 
works, see <http://gcc.gnu.org/wiki/HowToPrepareATestcase>.  GFortran 
testcases go in gcc/gfortran.dg, lots of examples there.

Finally, the code has to be formatted according to the GNU Coding 
Standard, see the links from 
<http://gcc.gnu.org/contribute.html#standards>.  An if should be 
formatted like
     if (something)
       {
         foo ();
         bar ();
       }
Also, there should be a blank
   mpz_getui(put_size)
            ^
here.

As for comments, the canonical form for your comment
> +/*
> +  Any modifications to the seeds that change kiss_size below need to be
> +  reflected in check.c (gfc_check_random_seed) to enable correct
> +  compile-time checking of PUT size for the RANDOM_SEED intrinsic.
> +*/
would be

/* Any modifications to the seeds that change kiss_size below need to be
    reflected in check.c (gfc_check_random_seed) to enable correct
    compile-time checking of PUT size for the RANDOM_SEED intrinsic.  */

I.e. there are no "beauty" blanks.  I see that the surrounding code also 
doesn't strictly adhere to this rule.  A comment always ends in 
"punctuation - two blanks - */", that is to ensure that comments are 
full sentences and the two blanks come from the typewriter convention of 
leaving two spaces after the ends of sentences.

Having done the boring part of the review, I'll leave the technical part 
to one of our library guys.

Cheers, and welcome on board,
- Tobi



More information about the Fortran mailing list