OSDN Git Service

* intrinsic.c (check_intrinsic_standard): Include error locus.
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Nov 2004 00:27:13 +0000 (00:27 +0000)
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Nov 2004 00:27:13 +0000 (00:27 +0000)
Remove VLA.
(gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
locus to check_intrinsic_standard.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89971 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/intrinsic.c

index a059080..2ce462b 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-02  Paul Brook  <paul@codesourcery.com>
+
+       * intrinsic.c (check_intrinsic_standard): Include error locus.
+       Remove VLA.
+       (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
+       locus to check_intrinsic_standard.
+
 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
 
        PR fortran/17590
index 1c1698f..b0a1d18 100644 (file)
@@ -2670,18 +2670,13 @@ gfc_init_expr_extensions (gfc_intrinsic_sym *isym)
    has chosen.  */
 
 static void
-check_intrinsic_standard (const char *name, int standard)
+check_intrinsic_standard (const char *name, int standard, locus * where)
 {
-  int name_len;
-  char msgstr[name_len + 53];
-
   if (!gfc_option.warn_nonstd_intrinsics)
     return;
 
-  name_len = strlen (name);
-  strncpy (msgstr, name, name_len + 1);
-  strncat (msgstr, " intrinsic is not included in the selected standard.", 53);
-  gfc_notify_std (standard, msgstr);
+  gfc_notify_std (standard, "Intrinsic '%s' at %L is not included"
+                 "in the selected standard", name, where);
 }
 
 
@@ -2794,7 +2789,7 @@ got_specific:
        }
     }
 
-  check_intrinsic_standard (name, isym->standard);
+  check_intrinsic_standard (name, isym->standard, &expr->where);
 
   return MATCH_YES;
 }
@@ -2851,7 +2846,7 @@ gfc_intrinsic_sub_interface (gfc_code * c, int error_flag)
       return MATCH_ERROR;
     }
 
-  check_intrinsic_standard (name, isym->standard);
+  check_intrinsic_standard (name, isym->standard, &c->loc);
 
   return MATCH_YES;