http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48858

--- Comment #3 from Bill Long <longb at cray dot com> 2011-05-04 22:40:31 UTC 
---
On 5/4/11 3:28 AM, burnus at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48858

>
> (In reply to comment #1)
> [BIND(C) with OPTIONAL arguments]
>> The Intel and PGI compilers already support this (no compile errors, correct
>> output).
>
> Having a correct output is probably not surprising as most Fortran compilers
> already handle OPTIONAL internally by passing a NULL pointer. Thus, also for
> gfortran it would only a few lines (allowing it unless -std=f95/f2003/f2008 is
> specified - and rejecting with BIND(C) the combination of OPTIONAL with 
> VALUE).
> I was thinking of introducing an flag -std=f2008tr, which will allow F2008 
> with
> the two TR, which are being drafted: TR 29113 and the coarray TR.
>

Seems like a reasonable approach.  PGI and Intel are nominally out of 
compliance since the current ban on BIND(C) and OPTIONAL is a 
constraint.  Tying to compiler options is a way to avoid that issue.

> It's on my agenda (cf. PR 48820 and http://gcc.gnu.org/wiki/TR29113Status), 
> but
> as it is a post-F2008 item, I thought I wait for the PDTR or FDTR and
> concentrate until then on, e.g., coarrays.
>

Sounds like a good plan to me.

Reply via email to