aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-07-17 22:07:32 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2012-07-17 22:07:32 +0200
commit7fe3aa081150a5d140a8a6276b659aa906ad0cd5 (patch)
tree47ad953b099c3f553e0c713ba01a4b4e39c7960a /gcc/fortran
parent947296ca906e03d78715ac7ed64cf21cea553c6c (diff)
downloadgcc-7fe3aa081150a5d140a8a6276b659aa906ad0cd5.zip
gcc-7fe3aa081150a5d140a8a6276b659aa906ad0cd5.tar.gz
gcc-7fe3aa081150a5d140a8a6276b659aa906ad0cd5.tar.bz2
re PR fortran/53985 (-Wno-c-binding-type still prints a warning)
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. From-SVN: r189586
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/decl.c4
2 files changed, 8 insertions, 2 deletions
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 <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/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),