public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/53985] New: -Wno-c-binding-type still prints a warning
@ 2012-07-16 18:46 burnus at gcc dot gnu.org
2012-07-17 20:08 ` [Bug fortran/53985] " burnus at gcc dot gnu.org
2012-07-17 20:10 ` burnus at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-16 18:46 UTC (permalink / raw)
To: gcc-bugs
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 "
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53985] -Wno-c-binding-type still prints a warning
2012-07-16 18:46 [Bug fortran/53985] New: -Wno-c-binding-type still prints a warning burnus at gcc dot gnu.org
@ 2012-07-17 20:08 ` burnus at gcc dot gnu.org
2012-07-17 20:10 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-17 20:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53985
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-17 20:07:56 UTC ---
Author: burnus
Date: Tue Jul 17 20:07:32 2012
New Revision: 189586
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189586
Log:
2012-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/53985
* decl.c (gfc_verify_c_interop_param): Make warning conditional
on -Wc-binding-type works and improve the wording.
2012-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/53985
* gfortran.dg/bind_c_usage_26.f90: New.
* gfortran.dg/bind_c_procs.f03: Add dg-options
* "-Wc-binding-type".
* gfortran.dg/bind_c_usage_13.f03: Ditto.
* gfortran.dg/bind_c_usage_18.f90: Ditto.
* gfortran.dg/interop_params.f03: Ditto.
Added:
trunk/gcc/testsuite/gfortran.dg/bind_c_usage_26.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/bind_c_procs.f03
trunk/gcc/testsuite/gfortran.dg/bind_c_usage_13.f03
trunk/gcc/testsuite/gfortran.dg/bind_c_usage_18.f90
trunk/gcc/testsuite/gfortran.dg/interop_params.f03
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53985] -Wno-c-binding-type still prints a warning
2012-07-16 18:46 [Bug fortran/53985] New: -Wno-c-binding-type still prints a warning burnus at gcc dot gnu.org
2012-07-17 20:08 ` [Bug fortran/53985] " burnus at gcc dot gnu.org
@ 2012-07-17 20:10 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-17 20:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53985
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |burnus at gcc dot gnu.org
Resolution| |FIXED
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-17 20:10:24 UTC ---
FIXED
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-17 20:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-16 18:46 [Bug fortran/53985] New: -Wno-c-binding-type still prints a warning burnus at gcc dot gnu.org
2012-07-17 20:08 ` [Bug fortran/53985] " burnus at gcc dot gnu.org
2012-07-17 20:10 ` burnus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).