This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/53985] New: -Wno-c-binding-type still prints a warning


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

             Bug #: 53985
           Summary: -Wno-c-binding-type still prints a warning
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Seemingly, I forgot a rather common usage when adding -W(no-)c-binding-type.
For the following program, one still gets a warning by default â and it cannot
be silenced!

subroutine test(x) bind(C)
                 1
Warning: Variable 'x' at (1) is a parameter to the BIND(C) procedure 'test' but
may not be C interoperable


subroutine test(x) bind(C)
  integer :: x
end subroutine test


--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1029,3 +1033,3 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
                           sym->ns->proc_name->name);
-             else
+             else if (gfc_option.warn_c_binding_type)
                gfc_warning ("Variable '%s' at %L is a parameter to the "


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]