intrinsic.c (check_intrinsic_standard): Include error locus.
authorPaul Brook <paul@codesourcery.com>
Tue, 2 Nov 2004 00:27:13 +0000 (00:27 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Tue, 2 Nov 2004 00:27:13 +0000 (00:27 +0000)
* intrinsic.c (check_intrinsic_standard): Include error locus.
Remove VLA.
(gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
locus to check_intrinsic_standard.

From-SVN: r89971

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

index a05908095959e13e899eae6899cf484c2088353d..2ce462b08d017422b19470fc8c186e7a1a070a68 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 1c1698fdd2e38b8708a9ec98695abc628c16ad85..b0a1d189753aafbd0a76837a5f3136abcb10c339 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;