(j3.2006) BIND(C, name='') means no binding label?

Jim Xia jimxia
Wed Jul 25 14:43:03 EDT 2007

Bill Long <longb at cray.com> 
Sent by: j3-bounces at j3-fortran.org
07/25/2007 11:46 AM
Please respond to
longb at cray.com; Please respond to
fortran standards email list for J3 <j3 at j3-fortran.org>

fortran standards email list for J3 <j3 at j3-fortran.org>

Re: (j3.2006) BIND(C, name='') means no binding label?

Based on this paragraph, the previous declaration of FOO does not have a 
binding label.  What does that mean?  Does it mean it behaves just as if 
the following declaration: INTEGER(C_INT) :: foo,

Yes, essentially that. There is no binding label when name=" " is 
specified.  In the case of a variable, the BIND clause serves two purposes 
- to establish an external name (binding label) or that there is none, and 
to make sure that the type and type parameters are valid for interop.  For 
simple scalars like this example the second doesn't do much other than 
trigger a compiler check.    On the other hand, for procedures, a BIND 
clause might trigger an alternate argument passing convention.  You might 
need the calling convention capability but do not want an external name, 
as when the procedure is referenced through a procedure pointer.  The 
name=" " option is there mainly for that case, and included in the 
variable case for consistency.


If name=' ' implies "possible" change in calling convention, then I think 
this is asking for trouble in that the program written in this way is not 
portable.  I think we need to make a choice and clarify this in the 


Jim Xia

XL Fortran Compiler Testing
IBM Toronto Lab at 8200 Warden Ave.
Phone (905) 413-3444  Tie-line 969-3444
D2/NAH/8200 /MKM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20070725/0d352afe/attachment.html 

More information about the J3 mailing list