[Fortran-Experiments] Merge to r120360
Christopher D. Rickett
crickett@lanl.gov
Wed Feb 21 22:38:00 GMT 2007
>> gfortran compiles the following without any error/warning:
>> -----------------------
>> subroutine var bind(c)
>> end subroutine var
>> -----------------------
>> I think this is invalid and one needs to add a "()", i.e. "subroutine
>> var () bind(c)". (cf. R1232 in "12.5.2.2 Subroutine subprogram").
>
> i didn't think that this was an error. the syntax rule for subroutine-stmt
> and constraints listed in the annex D didn't specify that the parens are
> required if you have bind(c) (at least not that i see). do you know of a
> location where the standard makes the requirement?
>
you are correct; i did not read the syntax rule close enough. the parens
are not optional if bind(c) is given. thanks for pointing that out.
Chris
More information about the Fortran
mailing list