diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-02-01 00:29:54 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2015-02-01 00:29:54 +0000 |
commit | db30e21cbff7b9b2acd13ab83e25e3bf52f9696f (patch) | |
tree | fad3fc076df76ea6f97827a7d37d80fc03eb5bbe /gcc/fortran/intrinsic.c | |
parent | 35fa7aa7371d5415398c995b518b543ccc2d29c6 (diff) | |
download | gcc-db30e21cbff7b9b2acd13ab83e25e3bf52f9696f.zip gcc-db30e21cbff7b9b2acd13ab83e25e3bf52f9696f.tar.gz gcc-db30e21cbff7b9b2acd13ab83e25e3bf52f9696f.tar.bz2 |
Always pass 0 or option number to gfc_warning*.
Similar to the issue with fatal_error that I fixed in
<https://gcc.gnu.org/ml/gcc-patches/2015-01/msg02690.html>, the
overloads of gfc_warning and gfc_warning_now (with and without a first
argument for an option number) also break gcc.pot regeneration because
xgettext expects the translated string argument to be in a fixed
position for a given function name. This patch applies the
corresponding fix of always passing a first argument (option number or
0), just like the core diagnostic functions warning and warning_at,
and removing the problem overloads without it.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu.
* error.c (gfc_warning (const char *, ...), gfc_warning_now (const
char *, ...)): Remove functions.
* gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
(const char *, ...)): Remove declarations.
* arith.c, check.c, data.c, decl.c, frontend-passes.c,
interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
trans-common.c, trans-const.c, trans-stmt.c: All callers of
gfc_warning and gfc_warning_now changed to pass 0 or option number
as first argument.
From-SVN: r220313
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 3585e72..a958f8e 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -4316,7 +4316,7 @@ gfc_check_intrinsic_standard (const gfc_intrinsic_sym* isym, { /* Do only print a warning if not a GNU extension. */ if (!silent && isym->standard != GFC_STD_GNU) - gfc_warning ("Intrinsic %qs (is %s) is used at %L", + gfc_warning (0, "Intrinsic %qs (is %s) is used at %L", isym->name, _(symstd_msg), &where); return true; @@ -4617,7 +4617,7 @@ gfc_convert_type_warn (gfc_expr *expr, gfc_typespec *ts, int eflag, int wflag) /* At this point, a conversion is necessary. A warning may be needed. */ if ((gfc_option.warn_std & sym->standard) != 0) { - gfc_warning_now ("Extension: Conversion from %s to %s at %L", + gfc_warning_now (0, "Extension: Conversion from %s to %s at %L", gfc_typename (&from_ts), gfc_typename (ts), &expr->where); } |