(j3.2006) (SC22WG5.4126) Problems created by some compiler extended size options
Jim Xia
jimxia
Fri Nov 13 14:49:35 EST 2009
Craig
C standard promotes the parameter if the types doesn't match the formal
argument. What is your interface for bindc_function? Also C compilers
commonly have options to control size of int.
Cheers,
Jim Xia
XL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444 Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM
http://www.ibm.com/software/awdtools/fortran/xlfortran
From:
Craig Rasmussen <crasmussen at newmexicoconsortium.org>
To:
WG5 <sc22wg5 at open-std.org>
Date:
11/13/2009 02:26 PM
Subject:
(j3.2006) (SC22WG5.4126) Problems created by some compiler extended size
options
There was a discussion at the MPI forum regarding the use of extended
size compiler options. It appears that there some options on some
compilers that promote integers even if the kind parameter is specified.
The problem with this is that it breaks the C interoperability
standard. For example, the code,
integer(C_INT) :: i
call bindc_function(i)
appears to be broken as the variable i will get promoted.
Is this a common compiler option? I've been told that users most
often chose the compiler option that promotes everything, even if an
explicit kind is provided.
I think this practice is evil!
-craig
_______________________________________________
J3 mailing list
J3 at j3-fortran.org
http://j3-fortran.org/mailman/listinfo/j3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20091113/8277f481/attachment.htm>
More information about the J3
mailing list