From 4166acc76b9450726817951d1a7fd1828bd04041 Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 3 Dec 2014 17:50:06 +0000 Subject: gcc/testsuite/ChangeLog: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2014-12-03 Manuel López-Ibáñez 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 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 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218326 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/trans-expr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/trans-expr.c') diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index f8e4df8a74e..7bdcc724935 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1112,10 +1112,12 @@ static void realloc_lhs_warning (bt type, bool array, locus *where) { if (array && type != BT_CLASS && type != BT_DERIVED && warn_realloc_lhs) - gfc_warning ("Code for reallocating the allocatable array at %L will " + gfc_warning (OPT_Wrealloc_lhs, + "Code for reallocating the allocatable array at %L will " "be added", where); else if (warn_realloc_lhs_all) - gfc_warning ("Code for reallocating the allocatable variable at %L " + gfc_warning (OPT_Wrealloc_lhs_all, + "Code for reallocating the allocatable variable at %L " "will be added", where); } -- cgit v1.2.1