http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52101

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-16 
19:38:33 UTC ---
Untested patch:

--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -725,3 +729,3 @@ syntax:
 static match
-match_char_length (gfc_expr **expr, bool *deferred)
+match_char_length (gfc_expr **expr, bool *deferred, bool obsolenscent_check)
 {
@@ -741,4 +745,5 @@ match_char_length (gfc_expr **expr, bool *deferred)
     {
-      if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: "
-                         "Old-style character length at %C") == FAILURE)
+      if (obsolenscent_check
+         && gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: "
+                            "Old-style character length at %C") == FAILURE)
        return MATCH_ERROR;
@@ -1029,3 +1034,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 "
@@ -1851,3 +1856,3 @@ variable_decl (int elem)
     {
-      switch (match_char_length (&char_len, &cl_deferred))
+      switch (match_char_length (&char_len, &cl_deferred), false)
        {
@@ -2413,3 +2418,3 @@ gfc_match_char_spec (gfc_typespec *ts)

-  m = match_char_length (&len, &deferred);
+  m = match_char_length (&len, &deferred, true);
   if (m != MATCH_NO)

Reply via email to