diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-08-20 23:07:29 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-08-20 23:07:29 +0000 |
commit | 18767f6502134a72689c3b7be96723a0c03a6a30 (patch) | |
tree | 3f03556a5974697ffb4bafd96217230d8739848a /gcc/diagnostic.c | |
parent | 22e6bd6f6c83773aad53732b5880eb07d9100499 (diff) | |
download | gcc-18767f6502134a72689c3b7be96723a0c03a6a30.zip gcc-18767f6502134a72689c3b7be96723a0c03a6a30.tar.gz gcc-18767f6502134a72689c3b7be96723a0c03a6a30.tar.bz2 |
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
gcc/ChangeLog:
2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* diagnostic.c (default_diagnostic_finalizer): Move caret printing
to here ...
(diagnostic_report_diagnostic): ... from here.
* toplev.c (general_init): Move code to c-family.
gcc/cp/ChangeLog:
2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* error.c (cp_diagnostic_finalizer): Delete.
(init_error): Do not set diagnostic_finalizer here.
gcc/c-family/ChangeLog:
2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* c-opts.c: Include tree-diagnostics.h.
(c_diagnostic_finalizer): New.
(c_common_initialize_diagnostics): Use it.
gcc/fortran/ChangeLog:
2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* error.c (gfc_diagnostic_finalizer): Call default finalizer.
From-SVN: r214245
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 6244721..9e6bfe5 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -554,9 +554,12 @@ default_diagnostic_starter (diagnostic_context *context, } void -default_diagnostic_finalizer (diagnostic_context *context ATTRIBUTE_UNUSED, - diagnostic_info *diagnostic ATTRIBUTE_UNUSED) +default_diagnostic_finalizer (diagnostic_context *context, + diagnostic_info *diagnostic) { + diagnostic_show_locus (context, diagnostic); + pp_destroy_prefix (context->printer); + pp_newline_and_flush (context->printer); } /* Interface to specify diagnostic kind overrides. Returns the @@ -805,10 +808,7 @@ diagnostic_report_diagnostic (diagnostic_context *context, pp_format (context->printer, &diagnostic->message); (*diagnostic_starter (context)) (context, diagnostic); pp_output_formatted_text (context->printer); - diagnostic_show_locus (context, diagnostic); (*diagnostic_finalizer (context)) (context, diagnostic); - pp_destroy_prefix (context->printer); - pp_newline_and_flush (context->printer); diagnostic_action_after_output (context, diagnostic); diagnostic->message.format_spec = saved_format_spec; diagnostic->x_data = NULL; |