This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55465] Name collision in C binding (calling C from Fortran)
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Nov 2012 20:57:53 +0000
- Subject: [Bug fortran/55465] Name collision in C binding (calling C from Fortran)
- Auto-submitted: auto-generated
- References: <bug-55465-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55465
--- Comment #11 from Harald Anlauf <anlauf at gmx dot de> 2012-11-26 20:57:53 UTC ---
I'm also having difficulties to see how the interface definition
could be standard compatible. The F2k8 draft says:
15.5.1 Deïnition and reference of interoperable procedures
A procedure that is interoperable may be deïned either by means other than
Fortran or by means of a Fortran subprogram, but not both.
If the procedure is deïned by means other than Fortran, it shall
â be describable by a C prototype that is interoperable with the interface,
â have a name that has external linkage as deïned by 6.2.2 of ISO/IEC
9899:1999, and
â have the same binding label as the interface.
Can somebody show the C prototype of the function SQLSetEnvAttr()?
Note that allowed prototypes are restricted by
15.3.7 Interoperability of procedures and procedure interfaces
and in particular:
(4) any dummy argument with the VALUE attribute is interoperable with the
corresponding formal
parameter of the prototype,
(6) the prototype does not have variable arguments as denoted by the ellipsis
(...).