[Fortran-Experiments] Merge to r120360
Christopher D. Rickett
crickett@lanl.gov
Thu Feb 22 06:02:00 GMT 2007
> On Wed, Feb 21, 2007 at 07:38:38PM -0700, Christopher D. Rickett wrote:
>>
>> >> function test()
>> >> integer(c_int) :: test
>> >> bind(c,name="kk") :: test
>> >> ! NAG f95: "BIND(C) for non-variable TEST"
>> >> ! gfortran, g95: Accepted
>> >> test = 5_c_int
>> >> end function test
>> >
>> > i'll look into this. shouldn't test be allowed in the bind(c...)
>> > statement? that seems like it should be ok.
>>
>> i looked at the standard, and it does specify that the bind attribute
>> and
>> bind attribute statement refer to variables or common blocks. this
>> doesn't include functions/subroutines. procedures are required to have
>> the proc-lang-binding-spec. i'll fix this and submit a patch. in my
>> opinion, i'm not sure why this limitation is there, but it shouldn't be
>> too difficult to enforce.
>>
>
> If you want to get some of the J3 committee members to comment,
> you could post a question about the rationale on comp.lang.fortran.
> Of course, you sometimes get a sorts of answer except the one
> you want or need.
>
i've recently joined the J3 committee, so if i remember, i can ask someone
next time. either way, i've fixed gfortran to catch this and report a
useful error. it will be in my next patch (tomorrow, probably).
thanks.
Chris
More information about the Fortran
mailing list