diff options
author | Paul Brook <paul@codesourcery.com> | 2004-11-02 00:27:13 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-11-02 00:27:13 +0000 |
commit | 9e660c4932b60f28d75ab87e12ac81585e6d7443 (patch) | |
tree | a195e9ab84866f6c0e2c542126ddc68982be8389 /gcc | |
parent | edfaf675109ca666d7ddbd901c82c18383385255 (diff) | |
download | gcc-9e660c4932b60f28d75ab87e12ac81585e6d7443.zip gcc-9e660c4932b60f28d75ab87e12ac81585e6d7443.tar.gz gcc-9e660c4932b60f28d75ab87e12ac81585e6d7443.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/intrinsic.c | 15 |
2 files changed, 12 insertions, 10 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a059080..2ce462b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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 diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 1c1698f..b0a1d18 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -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; |