aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index bdb8c39..75b8a89 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -3930,7 +3930,7 @@ verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts,
{
tmp_sym = tmp_sym->result;
/* Make sure it wasn't an implicitly typed result. */
- if (tmp_sym->attr.implicit_type)
+ if (tmp_sym->attr.implicit_type && gfc_option.warn_c_binding_type)
{
gfc_warning ("Implicitly declared BIND(C) function '%s' at "
"%L may not be C interoperable", tmp_sym->name,
@@ -3951,7 +3951,7 @@ verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts,
if (gfc_verify_c_interop (&(tmp_sym->ts)) != SUCCESS)
{
/* See if we're dealing with a sym in a common block or not. */
- if (is_in_common == 1)
+ if (is_in_common == 1 && gfc_option.warn_c_binding_type)
{
gfc_warning ("Variable '%s' in common block '%s' at %L "
"may not be a C interoperable "
@@ -3965,7 +3965,7 @@ verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts,
gfc_error ("Type declaration '%s' at %L is not C "
"interoperable but it is BIND(C)",
tmp_sym->name, &(tmp_sym->declared_at));
- else
+ else if (gfc_option.warn_c_binding_type)
gfc_warning ("Variable '%s' at %L "
"may not be a C interoperable "
"kind but it is bind(c)",