[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug fortran/55465] Name collision in C binding (calling C from Fortran)
From:       "juno.krahn at nih dot gov" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2012-11-30 17:21:08
Message-ID: bug-55465-4-ewGXH2QvbE () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55465

--- Comment #13 from Juno Krahn <juno.krahn at nih dot gov> 2012-11-30 17:21:08 UTC ---
This issue was once discussed by members of the Fortran standards committee. I
don't recall if that was on usenet or somewhere in the committee meeting notes.
The conclusion was that it is useful to allow for multiple explicit interfaces
in order to interface correctly with C libraries, and that the standards allow
for it.

The standards state that the defined interface must be compatible with the C
routine, but there are multiple ways to define a single interface. For example,
a pointer argument can be a pass-by-reference or just a C pointer. It might
make sense to validate that each interface spec does in fact have the same
binary call signature. Depending on compiler internals, that may be difficult
to implement.

In any case, it might be good to keep this as an optional warning because it is
not that common and could in fact be an error.

As for previous comments, yes someone should report this problem to NAG and
IBM.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic