Commit 9e660c49 by Paul Brook Committed by Paul Brook

intrinsic.c (check_intrinsic_standard): Include error locus.

	* 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
parent edfaf675
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> 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR fortran/17590 PR fortran/17590
......
...@@ -2670,18 +2670,13 @@ gfc_init_expr_extensions (gfc_intrinsic_sym *isym) ...@@ -2670,18 +2670,13 @@ gfc_init_expr_extensions (gfc_intrinsic_sym *isym)
has chosen. */ has chosen. */
static void 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) if (!gfc_option.warn_nonstd_intrinsics)
return; return;
name_len = strlen (name); gfc_notify_std (standard, "Intrinsic '%s' at %L is not included"
strncpy (msgstr, name, name_len + 1); "in the selected standard", name, where);
strncat (msgstr, " intrinsic is not included in the selected standard.", 53);
gfc_notify_std (standard, msgstr);
} }
...@@ -2794,7 +2789,7 @@ got_specific: ...@@ -2794,7 +2789,7 @@ got_specific:
} }
} }
check_intrinsic_standard (name, isym->standard); check_intrinsic_standard (name, isym->standard, &expr->where);
return MATCH_YES; return MATCH_YES;
} }
...@@ -2851,7 +2846,7 @@ gfc_intrinsic_sub_interface (gfc_code * c, int error_flag) ...@@ -2851,7 +2846,7 @@ gfc_intrinsic_sub_interface (gfc_code * c, int error_flag)
return MATCH_ERROR; return MATCH_ERROR;
} }
check_intrinsic_standard (name, isym->standard); check_intrinsic_standard (name, isym->standard, &c->loc);
return MATCH_YES; return MATCH_YES;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment