This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Intrinsic documentation for DIM, MOD and MODULO.
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jeff Law <law at redhat dot com>
- Cc: Mark Eggleston <mark dot eggleston at codethink dot co dot uk>, gcc-patches <gcc-patches at gcc dot gnu dot org>, fortran <fortran at gcc dot gnu dot org>
- Date: Mon, 19 Aug 2019 09:19:19 -0700
- Subject: Re: [PATCH] Intrinsic documentation for DIM, MOD and MODULO.
- References: <firstname.lastname@example.org> <email@example.com>
- Reply-to: sgk at troutmask dot apl dot washington dot edu
On Mon, Aug 19, 2019 at 09:08:12AM -0600, Jeff Law wrote:
> On 8/19/19 3:11 AM, Mark Eggleston wrote:
> > The intrinsics DIM, MOD and MODULO can accept arguments of different
> > kinds and return values with the larger of the two kinds. Notes to this
> > effect have been added as they were missing from the documentation.
> > Please find attached the patch.
> > ChangeLog:
> > gcc/fortran/ChangeLog
> > Mark Eggleston <firstname.lastname@example.org>
> > PR fortran/89236
> > * intrinsic.texi: Add GNU extension notes to DIM, MOD, MODULO.
> Do we want to be more specific about what types are accepted as a GNU
> extension for these operators?
The current documentation already has that info.
X The type shall be 'INTEGER' or 'REAL'
Y The type shall be the same type and kind as X.
In Fortran standardese, INTEGER means any of the supported
integer kinds (e.g., INTEGER(2)). X and Y must both be either
INTEGER or REAL, and X and Y must have the same kind type
paramter. Mark's addition to the manual notes that the
GNU extension allows different kind type parameters, e.g.,
k = dim(i,j)
converts i to an integer(2) before executing the function.
Mark, BTW and IMHO, for minor changes/improvements to the gfortran
documentation, I consider these to be pre-approved. For
large changes, or if you want someone to proofread a change,
then asking for commit approval is appropriate.