aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2014-12-03 17:50:06 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2014-12-03 17:50:06 +0000
commit48749dbcc461753861059d1fc48c40d2e0aefaa2 (patch)
treeffa63d8c289a7c4e01689478d728abff9b4c33ab /gcc/fortran/simplify.c
parentd6d34aa9133afdee0ca74b354a72cb720f431c1a (diff)
downloadgcc-48749dbcc461753861059d1fc48c40d2e0aefaa2.zip
gcc-48749dbcc461753861059d1fc48c40d2e0aefaa2.tar.gz
gcc-48749dbcc461753861059d1fc48c40d2e0aefaa2.tar.bz2
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
gcc/testsuite/ChangeLog: 2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * gfortran.dg/warnings_are_errors_1.f90: Update warnings to errors. * gfortran.dg/warnings_are_errors_1.f: Likewise. gcc/fortran/ChangeLog: 2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * gfortran.h (gfc_warning): Now returns bool. Add overload that accepts opt. (gfc_warning_1): Declare. * error.c (pp_warning_buffer,warningcount_buffered,werrorcount_buffered): New. (gfc_buffer_error): Set pp_warning_buffer.flush_p. (gfc_clear_pp_buffer): New. (gfc_warning_1): Renamed from gfc_warning. (gfc_warning): Add three new overloads. One that takes just a format string and ellipsis, another that takes also a warning option, and another that takes also va_list instead of ellipsis. (gfc_clear_warning): Clear pp_warning_buffer. (gfc_warning_check): Flush pp_warning_buffer and update warning and werror counters. (gfc_diagnostics_init): Init pp_warning_buffer. * Update all gfc_warning calls that do not multiple locations to use %qs and OPT_W*, otherwise use gfc_warning_1. gcc/ChangeLog: 2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * pretty-print.c (output_buffer::output_buffer): Init flush_p to true. (pp_flush): Flush only if flush_p. (pp_really_flush): New. * pretty-print.h (struct output_buffer): Add flush_p. (pp_really_flush): Declare. From-SVN: r218326
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 7ccabc7..095de6b 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -716,7 +716,8 @@ simplify_achar_char (gfc_expr *e, gfc_expr *k, const char *name, bool ascii)
}
if (ascii && warn_surprising && mpz_cmp_si (e->value.integer, 127) > 0)
- gfc_warning ("Argument of %s function at %L outside of range [0,127]",
+ gfc_warning (OPT_Wsurprising,
+ "Argument of %s function at %L outside of range [0,127]",
name, &e->where);
if (kind == 1 && mpz_cmp_si (e->value.integer, 255) > 0)
@@ -2505,7 +2506,8 @@ gfc_simplify_iachar (gfc_expr *e, gfc_expr *kind)
index = e->value.character.string[0];
if (warn_surprising && index > 127)
- gfc_warning ("Argument of IACHAR function at %L outside of range 0..127",
+ gfc_warning (OPT_Wsurprising,
+ "Argument of IACHAR function at %L outside of range 0..127",
&e->where);
k = get_kind (BT_INTEGER, kind, "IACHAR", gfc_default_integer_kind);