From 7fe3aa081150a5d140a8a6276b659aa906ad0cd5 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 17 Jul 2012 22:07:32 +0200 Subject: re PR fortran/53985 (-Wno-c-binding-type still prints a warning) 2012-07-17 Tobias Burnus 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 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. From-SVN: r189586 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/decl.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9042014..dd7958b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2012-07-17 Tobias Burnus + 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 + PR fortran/52101 * decl.c (match_char_length): Extra argument, show obsolenscent warning only if *length is used after the typename. diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 89d501c..83a4c60 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1028,8 +1028,8 @@ gfc_verify_c_interop_param (gfc_symbol *sym) "because it is polymorphic", sym->name, &(sym->declared_at), sym->ns->proc_name->name); - else - gfc_warning ("Variable '%s' at %L is a parameter to the " + else if (gfc_option.warn_c_binding_type) + gfc_warning ("Variable '%s' at %L is a dummy argument of the " "BIND(C) procedure '%s' but may not be C " "interoperable", sym->name, &(sym->declared_at), -- cgit v1.1