diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-11 15:13:33 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-11 15:13:33 +0000 |
commit | c4100eaea3acd1a0d88050ad721f36470a0a6e5d (patch) | |
tree | 6688e37de9262fa9b6efc826ef89c8b02ae776ba /gcc/fortran/class.c | |
parent | 217d0904fab9c653eeefe27d94cb73f5516c4d83 (diff) | |
download | gcc-c4100eaea3acd1a0d88050ad721f36470a0a6e5d.zip gcc-c4100eaea3acd1a0d88050ad721f36470a0a6e5d.tar.gz gcc-c4100eaea3acd1a0d88050ad721f36470a0a6e5d.tar.bz2 |
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
gcc/ChangeLog:
2014-12-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* diagnostic.c (diagnostic_action_after_output): Make it extern.
Take diagnostic_t argument instead of diagnostic_info. Count also
DK_WERROR towards max_errors.
(diagnostic_report_diagnostic): Update call according to the above.
(error_recursion): Likewise.
* diagnostic.h (diagnostic_action_after_output): Declare.
* pretty-print.c (pp_formatted_text_data): Delete.
(pp_append_r): Call output_buffer_append_r.
(pp_formatted_text): Call output_buffer_formatted_text.
(pp_last_position_in_text): Call output_buffer_last_position_in_text.
* pretty-print.h (output_buffer_formatted_text): New.
(output_buffer_append_r): New.
(output_buffer_last_position_in_text): New.
gcc/fortran/ChangeLog:
2014-12-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* error.c (pp_error_buffer): New static variable.
(pp_warning_buffer): Make it a pointer.
(gfc_output_buffer_empty_p): New.
(gfc_error_init_1): Call gfc_buffer_error.
(gfc_buffer_error): Do not use pp_warning_buffer.flush_p as the
buffered_p flag.
(gfc_clear_warning): Likewise.
(gfc_warning_check): Call gfc_clear_warning. Only check the new
pp_warning_buffer if the old warning_buffer was empty. Call
diagnostic_action_after_output.
(gfc_error_1): Renamed from gfc_error.
(gfc_error): New.
(gfc_clear_error): Clear also pp_error_buffer.
(gfc_error_flag_test): Check also pp_error_buffer.
(gfc_error_check): Likewise. Only check the new pp_error_buffer
if the old error_buffer was empty.
(gfc_move_output_buffer_from_to): New.
(gfc_push_error): Use it here. Take also an output_buffer as argument.
(gfc_pop_error): Likewise.
(gfc_free_error): Likewise.
(gfc_diagnostics_init): Use XNEW and placement-new to init
pp_error_buffer and pp_warning_buffer. Set flush_p to false for
both pp_warning_buffer and pp_error_buffer.
* Update gfc_push_error, gfc_pop_error and gfc_free_error calls
according to the above changes.
* Use gfc_error_1 for all gfc_error calls that use multiple
locations.
* Use %qs instead of '%s' for many gfc_error calls.
From-SVN: r218627
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r-- | gcc/fortran/class.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 0286c9e..5130022 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -666,7 +666,7 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, up to 255 extension levels. */ if (ts->u.derived->attr.extension == 255) { - gfc_error ("Maximum extension level reached with type '%s' at %L", + gfc_error ("Maximum extension level reached with type %qs at %L", ts->u.derived->name, &ts->u.derived->declared_at); return false; } @@ -2686,7 +2686,7 @@ find_typebound_proc_uop (gfc_symbol* derived, bool* t, && res->n.tb->access == ACCESS_PRIVATE) { if (where) - gfc_error ("'%s' of '%s' is PRIVATE at %L", + gfc_error ("%qs of %qs is PRIVATE at %L", name, derived->name, where); if (t) *t = false; @@ -2760,7 +2760,7 @@ gfc_find_typebound_intrinsic_op (gfc_symbol* derived, bool* t, && res->access == ACCESS_PRIVATE) { if (where) - gfc_error ("'%s' of '%s' is PRIVATE at %L", + gfc_error ("%qs of %qs is PRIVATE at %L", gfc_op2string (op), derived->name, where); if (t) *t = false; |