diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-03 17:50:06 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-03 17:50:06 +0000 |
commit | 48749dbcc461753861059d1fc48c40d2e0aefaa2 (patch) | |
tree | ffa63d8c289a7c4e01689478d728abff9b4c33ab /gcc/fortran/trans-array.c | |
parent | d6d34aa9133afdee0ca74b354a72cb720f431c1a (diff) | |
download | gcc-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/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 47364da..f02ff32 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -1042,7 +1042,8 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, gfc_ss * ss, gcc_assert (ss->loop->dimen == ss->dimen); if (warn_array_temporaries && where) - gfc_warning ("Creating array temporary at %L", where); + gfc_warning (OPT_Warray_temporaries, + "Creating array temporary at %L", where); /* Set the lower bound to zero. */ for (s = ss; s; s = s->parent) @@ -5922,7 +5923,8 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, stride = gfc_index_one_node; if (warn_array_temporaries) - gfc_warning ("Creating array temporary at %L", &loc); + gfc_warning (OPT_Warray_temporaries, + "Creating array temporary at %L", &loc); } /* This is for the case where the array data is used directly without @@ -7205,10 +7207,12 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, bool g77, if (warn_array_temporaries) { if (fsym) - gfc_warning ("Creating array temporary at %L for argument '%s'", + gfc_warning (OPT_Warray_temporaries, + "Creating array temporary at %L for argument %qs", &expr->where, fsym->name); else - gfc_warning ("Creating array temporary at %L", &expr->where); + gfc_warning (OPT_Warray_temporaries, + "Creating array temporary at %L", &expr->where); } ptr = build_call_expr_loc (input_location, |