aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-02-01 00:29:54 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2015-02-01 00:29:54 +0000
commitdb30e21cbff7b9b2acd13ab83e25e3bf52f9696f (patch)
treefad3fc076df76ea6f97827a7d37d80fc03eb5bbe /gcc/fortran/parse.c
parent35fa7aa7371d5415398c995b518b543ccc2d29c6 (diff)
downloadgcc-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/parse.c')
-rw-r--r--gcc/fortran/parse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 34e3026..2c7c554 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -973,7 +973,7 @@ next_free (void)
if (gfc_match_eos () == MATCH_YES)
{
- gfc_warning_now ("Ignoring statement label in empty statement "
+ gfc_warning_now (0, "Ignoring statement label in empty statement "
"at %L", &label_locus);
gfc_free_st_label (gfc_statement_label);
gfc_statement_label = NULL;
@@ -1178,7 +1178,7 @@ next_fixed (void)
if (digit_flag)
{
if (label == 0)
- gfc_warning_now ("Zero is not a valid statement label at %C");
+ gfc_warning_now (0, "Zero is not a valid statement label at %C");
else
{
/* We've found a valid statement label. */
@@ -1234,7 +1234,7 @@ next_fixed (void)
blank_line:
if (digit_flag)
- gfc_warning_now ("Ignoring statement label in empty statement at %L",
+ gfc_warning_now (0, "Ignoring statement label in empty statement at %L",
&label_locus);
gfc_current_locus.lb->truncated = 0;
@@ -2683,7 +2683,7 @@ endType:
}
if (gfc_current_block ()->attr.sequence)
- gfc_warning ("SEQUENCE attribute at %C already specified in "
+ gfc_warning (0, "SEQUENCE attribute at %C already specified in "
"TYPE statement");
if (seen_sequence)
@@ -4345,7 +4345,7 @@ parse_oacc_loop (gfc_statement acc_st)
st = next_statement ();
if (st == ST_OACC_END_LOOP)
- gfc_warning ("Redundant !$ACC END LOOP at %C");
+ gfc_warning (0, "Redundant !$ACC END LOOP at %C");
if ((acc_st == ST_OACC_PARALLEL_LOOP && st == ST_OACC_END_PARALLEL_LOOP) ||
(acc_st == ST_OACC_KERNELS_LOOP && st == ST_OACC_END_KERNELS_LOOP) ||
(acc_st == ST_OACC_LOOP && st == ST_OACC_END_LOOP))