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/options.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/options.c')
-rw-r--r-- | gcc/fortran/options.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 4bae04e..60473dd 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -300,7 +300,7 @@ gfc_post_options (const char **pfilename) if (gfc_current_form == FORM_UNKNOWN) { gfc_current_form = FORM_FREE; - gfc_warning_now ("Reading file %qs as free form", + gfc_warning_now (0, "Reading file %qs as free form", (filename[0] == '\0') ? "<stdin>" : filename); } } @@ -310,10 +310,10 @@ gfc_post_options (const char **pfilename) if (gfc_current_form == FORM_FREE) { if (gfc_option.flag_d_lines == 0) - gfc_warning_now ("%<-fd-lines-as-comments%> has no effect " + gfc_warning_now (0, "%<-fd-lines-as-comments%> has no effect " "in free form"); else if (gfc_option.flag_d_lines == 1) - gfc_warning_now ("%<-fd-lines-as-code%> has no effect in free form"); + gfc_warning_now (0, "%<-fd-lines-as-code%> has no effect in free form"); if (warn_line_truncation == -1) warn_line_truncation = 1; @@ -344,18 +344,18 @@ gfc_post_options (const char **pfilename) if (!flag_automatic && flag_max_stack_var_size != -2 && flag_max_stack_var_size != 0) - gfc_warning_now ("Flag %<-fno-automatic%> overwrites %<-fmax-stack-var-size=%d%>", + gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-fmax-stack-var-size=%d%>", flag_max_stack_var_size); else if (!flag_automatic && flag_recursive) - gfc_warning_now ("Flag %<-fno-automatic%> overwrites %<-frecursive%>"); + gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-frecursive%>"); else if (!flag_automatic && flag_openmp) - gfc_warning_now ("Flag %<-fno-automatic%> overwrites %<-frecursive%> implied by " + gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-frecursive%> implied by " "%<-fopenmp%>"); else if (flag_max_stack_var_size != -2 && flag_recursive) - gfc_warning_now ("Flag %<-frecursive%> overwrites %<-fmax-stack-var-size=%d%>", + gfc_warning_now (0, "Flag %<-frecursive%> overwrites %<-fmax-stack-var-size=%d%>", flag_max_stack_var_size); else if (flag_max_stack_var_size != -2 && flag_openmp) - gfc_warning_now ("Flag %<-fmax-stack-var-size=%d%> overwrites %<-frecursive%> " + gfc_warning_now (0, "Flag %<-fmax-stack-var-size=%d%> overwrites %<-frecursive%> " "implied by %<-fopenmp%>", flag_max_stack_var_size); /* Implement -frecursive as -fmax-stack-var-size=-1. */ |