<br><font size=2 face="sans-serif">Craig</font>
<br>
<br><font size=2 face="sans-serif">C standard promotes the parameter if
the types doesn't match the formal argument. &nbsp;What is your interface
for bindc_function? &nbsp;Also C compilers commonly have options to control
size of int.</font>
<br>
<br><font size=2 face="sans-serif">Cheers,</font>
<br>
<br><font size=2 face="sans-serif">Jim Xia<br>
<br>
XL Fortran Compiler Test<br>
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7<br>
Phone (905) 413-3444 &nbsp;Tie-line 313-3444<br>
email: jimxia@ca.ibm.com<br>
D2/YF7/8200 /MKM<br>
<br>
</font><a href=http://www.ibm.com/software/awdtools/fortran/xlfortran><font size=2 face="sans-serif">http://www.ibm.com/software/awdtools/fortran/xlfortran</font></a>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Craig Rasmussen &lt;crasmussen@newmexicoconsortium.org&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">WG5 &lt;sc22wg5@open-std.org&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">11/13/2009 02:26 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">(j3.2006) (SC22WG5.4126) Problems created
by some compiler extended &nbsp; &nbsp; &nbsp; &nbsp;size options</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>There was a discussion at the MPI forum regarding
the use of extended &nbsp;<br>
size compiler options. &nbsp;It appears that there some options on some
&nbsp;<br>
compilers that promote integers even if the kind parameter is specified.<br>
<br>
The problem with this is that it breaks the C interoperability &nbsp;<br>
standard. &nbsp;For example, the code,<br>
<br>
 &nbsp; &nbsp; &nbsp; integer(C_INT) :: i<br>
 &nbsp; &nbsp; &nbsp; call bindc_function(i)<br>
<br>
appears to be broken as the variable i will get promoted.<br>
<br>
Is this a common compiler option? &nbsp;I've been told that users most
&nbsp;<br>
often chose the compiler option that promotes everything, even if an &nbsp;<br>
explicit kind is provided.<br>
<br>
I think this practice is evil!<br>
<br>
-craig<br>
<br>
_______________________________________________<br>
J3 mailing list<br>
J3@j3-fortran.org<br>
</font></tt><a href="http://j3-fortran.org/mailman/listinfo/j3"><tt><font size=2>http://j3-fortran.org/mailman/listinfo/j3</font></tt></a><tt><font size=2><br>
</font></tt>
<br>
<br>