This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR18578, PR18579, PR20857 and PR20885 - Constraints on INTENT(OUT and INOUT)
- From: Paul Brook <paul at codesourcery dot com>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, Steve Kargl <sgk at troutmask dot apl dot washington dot edu>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Sun, 29 Jan 2006 12:58:26 +0000
- Subject: Re: [Patch, fortran] PR18578, PR18579, PR20857 and PR20885 - Constraints on INTENT(OUT and INOUT)
- References: <43DC66F8.50306@wanadoo.fr> <200601291213.35379.paul@codesourcery.com> <43DCB851.1030306@wanadoo.fr>
On Sunday 29 January 2006 12:42, Paul Thomas wrote:
> Hello Paul,
>
> >Variables that aren't defined should be caught be the normal unused
> >parameter/variable warnings. AFAIK there's nothing special about
> > INTENT(OUT) that requires it be defined.
>
> 5.1.2.3 "The INTENT (OUT) attribute specifies that the dummy argument
> shall be defined before a reference to the dummy argument is made within
> the procedure an any actual argument that becomes associated with such a
> dummy argument shall be definable. On invocation of the procedure, such
> a dummy argument becomes undefiend except for the components of derived
> type for which default initialization has been specified." is why I did
> this. If I have misinterpreted this paragraph, I'd be quite happy to
> change the error to a warning.
The error (actual argument must be definable) is ok.
It's the warning (dummy argument not initialized) that seems redundant.
The standard only says the actual argument may be defined, not that it is
defined.
Paul