This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49111] Unnecessary warning for private interfaces having the BIND(C) attribute
- From: "craig.powers at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Oct 2012 20:53:53 +0000
- Subject: [Bug fortran/49111] Unnecessary warning for private interfaces having the BIND(C) attribute
- Auto-submitted: auto-generated
- References: <bug-49111-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49111
Craig Powers <craig.powers at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |craig.powers at gmail dot
| |com
--- Comment #3 from Craig Powers <craig.powers at gmail dot com> 2012-10-12 20:53:53 UTC ---
I see the accessibility denoted by PRIVATE/PUBLIC as conceptually different
from the accessibility denoted by BIND(C). In addition to the fact that
BIND(C) does not distinguish an import from an export, there is also the
consideration that one might wish to hide the C-callable routine (marked with
BIND(C)) from other Fortran code by also marking it PRIVATE.
I'm in the process of producing a Fortran interface to a C library, and I find
that there are some instances where I want to declare the import as PRIVATE and
then provide a wrapper routine to take care of the Fortran-to-C stuff that is
mechanical e.g. converting a Fortran array.
Because my Fortran is a little rusty, and this is my first time making any
extended use of the BIND(C) features, the warning made me concerned that I
hadn't accomplished what I intended to accomplish.
I see this warning as far more likely to be a spurious complaint about valid
and intended usage than to be a useful hint about something unintended.