re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 1 Nov 2018 12:00:59 +0000 (12:00 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 1 Nov 2018 12:00:59 +0000 (12:00 +0000)
2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/46020
* decl.c (verify_bind_c_sym): Improve error message.

From-SVN: r265719

gcc/fortran/ChangeLog
gcc/fortran/decl.c

index 4e0869b5abead9501b2406724e79cd148421eaac..87f3312eeef8991b9063f2aed33e0d18e8b7771e 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/46020
+       * decl.c (verify_bind_c_sym): Improve error message.
+
 2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/54613
index 87c736fb2dbc44b9c3c308bd5430daa06383697f..47c939ca85ee3f4682edef28587d56a751311db6 100644 (file)
@@ -5647,8 +5647,8 @@ verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts,
        if (tmp_sym->ts.u.cl == NULL || tmp_sym->ts.u.cl->length == NULL
            || tmp_sym->ts.u.cl->length->expr_type != EXPR_CONSTANT
            || mpz_cmp_si (tmp_sym->ts.u.cl->length->value.integer, 1) != 0)
-         gfc_error ("Return type of BIND(C) function %qs at %L cannot "
-                        "be a character string", tmp_sym->name,
+         gfc_error ("Return type of BIND(C) function %qs of character "
+                    "type at %L must have length 1 ", tmp_sym->name,
                         &(tmp_sym->declared_at));
     }