[Bug fortran/53985] New: -Wno-c-binding-type still prints a warning
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 16 18:46:00 GMT 2012
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 "
More information about the Gcc-bugs
mailing list