Age | Commit message (Collapse) | Author | Files | Lines |
|
gcc/c-family/ChangeLog:
PR other/69006
* c-opts.c (c_diagnostic_finalizer): Replace invocation of
pp_newline_and_flush with pp_flush.
gcc/cp/ChangeLog:
PR other/69006
* error.c (print_instantiation_partial_context_line): Add missing
newlines from output for the t == NULL case.
(print_instantiation_partial_context): Remove call to pp_newline.
gcc/ChangeLog:
PR other/69006
* diagnostic-show-locus.c (layout::print_source_line): Replace
call to pp_newline with call to layout::print_newline.
(layout::print_annotation_line): Likewise.
(layout::move_to_column): Likewise.
(layout::print_any_fixits): After printing any fixits, print a
trailing newline, if necessary.
(layout::print_newline): New method, resetting any colorization
before a newline.
(diagnostic_show_locus): Move the pp_newline to before the
early bailout. Remove dummy block enclosing the layout instance.
* diagnostic.c (default_diagnostic_finalizer): Replace invocation
of pp_newline_and_flush with pp_flush.
(diagnostic_append_note): Delete use of pp_newline.
(diagnostic_append_note_at_rich_loc): Delete.
* diagnostic.h (diagnostic_append_note_at_rich_loc): Delete.
* pretty-print.h (output_buffer_append_r): Reset buff->line_length
when newline characters are added to the buffer.
gcc/fortran/ChangeLog:
PR other/69006
* error.c (gfc_diagnostic_starter): Delete use of pp_newline.
gcc/testsuite/ChangeLog:
PR other/69006
* g++.dg/ext/timevar1.C: Add dg-allow-blank-lines-in-output
directive.
* gcc.dg/plugin/diagnostic-test-show-locus-color.c: Update
expected multiline output to reflect the colorization being
disabled before newlines.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
(custom_diagnostic_finalizer): Replace call to
pp_newline_and_flush with call to pp_flush.
* gcc.dg/unroll-2.c: Add dg-allow-blank-lines-in-output directive.
* gfortran.dg/implicit_class_1.f90: Likewise.
* lib/gcc-dg.exp (allow_blank_lines): New global.
(dg-allow-blank-lines-in-output): New procedure.
(gcc-dg-prune): Complain about blank lines in the output, unless
dg-allow-blank-lines-in-output was called.
* lib/multiline.exp (_build_multiline_regex): Only support
arbitrary followup text for non-blank-lines, not for blank lines.
From-SVN: r232837
|
|
From-SVN: r232055
|
|
gcc/c-family/ChangeLog:
* c-common.c (c_cpp_error): Update for change to
rich_location::set_range.
gcc/fortran/ChangeLog:
* error.c (gfc_format_decoder): Update for change of
text_info::set_range to text_info::set_location.
gcc/ChangeLog:
* pretty-print.c (text_info::set_range): Rename to...
(text_info::set_location): ...this, converting 2nd param
from source_range to a location_t.
* pretty-print.h (text_info::set_location): Convert
from inline function to external definition.
(text_info::set_range): Delete.
gcc/testsuite/ChangeLog:
* gcc.dg/diagnostic-ranges-1.c: New test file.
* gcc.dg/plugin/diagnostic-test-show-locus-bw.c
(test_percent_q_plus_d): New test function.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
(test_show_locus): Rewrite test code using
rich_location::set_range. Add code to unit-test the "%q+D"
format code.
libcpp/ChangeLog:
* include/line-map.h (rich_location::set_range): Add line_maps *
param; convert param from source_range to source_location. Drop
"overwrite_loc_p" param.
* line-map.c (rich_location::set_range): Likewise, acting as if
"overwrite_loc_p" were true, and getting range from the location.
From-SVN: r231367
|
|
gcc/ChangeLog:
* diagnostic-color.c (color_dict): Eliminate "caret"; add "range1"
and "range2".
(parse_gcc_colors): Update comment to describe default GCC_COLORS.
* diagnostic-core.h (warning_at_rich_loc): New declaration.
(error_at_rich_loc): New declaration.
(permerror_at_rich_loc): New declaration.
(inform_at_rich_loc): New declaration.
* diagnostic-show-locus.c (adjust_line): Delete.
(struct point_state): New struct.
(class colorizer): New class.
(class layout_point): New class.
(class layout_range): New class.
(struct line_bounds): New.
(class layout): New class.
(colorizer::colorizer): New ctor.
(colorizer::~colorizer): New dtor.
(layout::layout): New ctor.
(layout::print_source_line): New method.
(layout::print_annotation_line): New method.
(layout::get_state_at_point): New method.
(layout::get_x_bound_for_row): New method.
(diagnostic_show_locus): Reimplement in terms of class layout.
(diagnostic_print_caret_line): Delete.
* diagnostic.c (diagnostic_initialize): Replace
MAX_LOCATIONS_PER_MESSAGE with rich_location::MAX_RANGES.
(diagnostic_set_info_translated): Convert param from location_t
to rich_location *. Eliminate calls to set_location on the
message in favor of storing the rich_location ptr there.
(diagnostic_set_info): Convert param from location_t to
rich_location *.
(diagnostic_build_prefix): Break out array into...
(diagnostic_kind_color): New variable.
(diagnostic_get_color_for_kind): New function.
(diagnostic_report_diagnostic): Colorize the option_text
using the color for the severity.
(diagnostic_append_note): Update for change in signature of
diagnostic_set_info.
(diagnostic_append_note_at_rich_loc): New function.
(emit_diagnostic): Update for change in signature of
diagnostic_set_info.
(inform): Likewise.
(inform_at_rich_loc): New function.
(inform_n): Update for change in signature of diagnostic_set_info.
(warning): Likewise.
(warning_at): Likewise.
(warning_at_rich_loc): New function.
(warning_n): Update for change in signature of diagnostic_set_info.
(pedwarn): Likewise.
(permerror): Likewise.
(permerror_at_rich_loc): New function.
(error): Update for change in signature of diagnostic_set_info.
(error_n): Likewise.
(error_at): Likewise.
(error_at_rich_loc): New function.
(sorry): Update for change in signature of diagnostic_set_info.
(fatal_error): Likewise.
(internal_error): Likewise.
(internal_error_no_backtrace): Likewise.
(source_range::debug): New function.
* diagnostic.h (struct diagnostic_info): Eliminate field
"override_column". Add field "richloc".
(struct diagnostic_context): Add field "colorize_source_p".
(diagnostic_override_column): Delete.
(diagnostic_set_info): Convert param from location_t to
rich_location *.
(diagnostic_set_info_translated): Likewise.
(diagnostic_append_note_at_rich_loc): New function.
(diagnostic_num_locations): New function.
(diagnostic_expand_location): Get the location from the
rich_location.
(diagnostic_print_caret_line): Delete.
(diagnostic_get_color_for_kind): New declaration.
* genmatch.c (linemap_client_expand_location_to_spelling_point): New.
(error_cb): Update for change in signature of "error" callback.
(fatal_at): Likewise.
(warning_at): Likewise.
* input.c (linemap_client_expand_location_to_spelling_point): New.
* pretty-print.c (text_info::set_range): New method.
(text_info::get_location): New method.
* pretty-print.h (MAX_LOCATIONS_PER_MESSAGE): Eliminate this macro.
(struct text_info): Eliminate "locations" array in favor of
"m_richloc", a rich_location *.
(textinfo::set_location): Add a "caret_p" param, and reimplement
in terms of a call to set_range.
(textinfo::get_location): Eliminate inline implementation in favor of
an out-of-line reimplementation.
(textinfo::set_range): New method.
* rtl-error.c (diagnostic_for_asm): Update for change in signature
of diagnostic_set_info.
* tree-diagnostic.c (default_tree_printer): Update for new
"caret_p" param for textinfo::set_location.
* tree-pretty-print.c (percent_K_format): Likewise.
gcc/c-family/ChangeLog:
* c-common.c (c_cpp_error): Convert parameter from location_t to
rich_location *. Eliminate the "column_override" parameter and
the call to diagnostic_override_column.
Update the "done_lexing" clause to set range 0
on the rich_location, rather than overwriting a location_t.
* c-common.h (c_cpp_error): Convert parameter from location_t to
rich_location *. Eliminate the "column_override" parameter.
gcc/c/ChangeLog:
* c-decl.c (warn_defaults_to): Update for change in signature
of diagnostic_set_info.
* c-errors.c (pedwarn_c99): Likewise.
(pedwarn_c90): Likewise.
* c-objc-common.c (c_tree_printer): Update for new "caret_p" param
for textinfo::set_location.
gcc/cp/ChangeLog:
* error.c (cp_printer): Update for new "caret_p" param for
textinfo::set_location.
(pedwarn_cxx98): Update for change in signature of
diagnostic_set_info.
gcc/fortran/ChangeLog:
* cpp.c (cb_cpp_error): Convert parameter from location_t to
rich_location *. Eliminate the "column_override" parameter.
* error.c (gfc_warning): Update for change in signature of
diagnostic_set_info.
(gfc_format_decoder): Update handling of %C/%L for changes
to struct text_info.
(gfc_diagnostic_starter): Use richloc when determining whether to
print one locus or two. When handling a location that will
involve a call to diagnostic_show_locus, only attempt to print the
locus for the primary location, and don't call into
diagnostic_print_caret_line.
(gfc_warning_now_at): Update for change in signature of
diagnostic_set_info.
(gfc_warning_now): Likewise.
(gfc_error_now): Likewise.
(gfc_fatal_error): Likewise.
(gfc_error): Likewise.
(gfc_internal_error): Likewise.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic-test-show-locus-bw.c: New file.
* gcc.dg/plugin/diagnostic-test-show-locus-color.c: New file.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c: New file.
* gcc.dg/plugin/plugin.exp (plugin_test_list): Add the above.
* lib/gcc-dg.exp: Load multiline.exp.
libcpp/ChangeLog:
* errors.c (cpp_diagnostic): Update for change in signature
of "error" callback.
(cpp_diagnostic_with_line): Likewise, calling override_column
on the rich_location.
* include/cpplib.h (struct cpp_callbacks): Within "error"
callback, convert param from source_location to rich_location *,
and drop column_override param.
* include/line-map.h (struct source_range): New struct.
(struct location_range): New struct.
(class rich_location): New class.
(linemap_client_expand_location_to_spelling_point): New declaration.
* line-map.c (rich_location::rich_location): New ctors.
(rich_location::lazily_expand_location): New method.
(rich_location::override_column): New method.
(rich_location::add_range): New methods.
(rich_location::set_range): New method.
From-SVN: r229884
|
|
Fortran passes NULL where a non-null string is expected by the pretty-printer,
which causes a sanitizer warning. This could have been found earlier by using
gcc_checking_assert. Even if the assertion is false, the result is just an
incomplete diagnostic, thus it seems more user-friendly to assert only when
checking. I do not have any idea how to properly fix the Fortran bug, thus this
patch simply works-around it.
gcc/fortran/ChangeLog:
2015-09-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR pretty-print/67567
* resolve.c (resolve_fl_procedure): Work-around when iface->module
== NULL.
gcc/ChangeLog:
2015-09-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR pretty-print/67567
* pretty-print.c (pp_string): Add gcc_checking_assert.
* pretty-print.h (output_buffer_append_r): Likewise.
From-SVN: r228131
|
|
gcc/ChangeLog:
* pretty-print.h (printer_fn): Fix typo in comment.
From-SVN: r227562
|
|
2015-06-17 Andrew MacLeod <amacleod@redhat.com>
* coretypes.h: Include input.h and as-a.h.
* rtl.h: Include input.h and as-a.h for generator files.
* hwint.c: Include input.h.
* vec.c: Include input.h.
* alias.c: Do not include input.h, line-map.h or is-a.h.
* asan.c: Likewise.
* attribs.c: Likewise.
* auto-inc-dec.c: Likewise.
* auto-profile.c: Likewise.
* bb-reorder.c: Likewise.
* bt-load.c: Likewise.
* builtins.c: Likewise.
* caller-save.c: Likewise.
* calls.c: Likewise.
* ccmp.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgbuild.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopanal.c: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraphbuild.c: Likewise.
* cgraphclones.c: Likewise.
* cgraphunit.c: Likewise.
* cilk-common.c: Likewise.
* combine-stack-adj.c: Likewise.
* combine.c: Likewise.
* compare-elim.c: Likewise.
* convert.c: Likewise.
* coverage.c: Likewise.
* cppbuiltin.c: Likewise.
* cprop.c: Likewise.
* cse.c: Likewise.
* cselib.c: Likewise.
* data-streamer-in.c: Likewise.
* data-streamer-out.c: Likewise.
* data-streamer.c: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* ddg.c: Likewise.
* debug.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* df.h: Likewise.
* dfp.c: Likewise.
* diagnostic-core.h: Likewise.
* diagnostic.c: Likewise.
* dojump.c: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* double-int.c: Likewise.
* dse.c: Likewise.
* dumpfile.c: Likewise.
* dumpfile.h: Likewise.
* dwarf2asm.c: Likewise.
* dwarf2cfi.c: Likewise.
* dwarf2out.c: Likewise.
* emit-rtl.c: Likewise.
* et-forest.c: Likewise.
* except.c: Likewise.
* explow.c: Likewise.
* expmed.c: Likewise.
* expr.c: Likewise.
* final.c: Likewise.
* fixed-value.c: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* fwprop.c: Likewise.
* gcc-plugin.h: Likewise.
* gcse.c: Likewise.
* generic-match-head.c: Likewise.
* ggc-page.c: Likewise.
* gimple-builder.c: Likewise.
* gimple-expr.c: Likewise.
* gimple-fold.c: Likewise.
* gimple-iterator.c: Likewise.
* gimple-low.c: Likewise.
* gimple-match-head.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimple-ssa-isolate-paths.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* gimple-streamer-in.c: Likewise.
* gimple-streamer-out.c: Likewise.
* gimple-streamer.h: Likewise.
* gimple-walk.c: Likewise.
* gimple.c: Likewise.
* gimplify-me.c: Likewise.
* gimplify.c: Likewise.
* godump.c: Likewise.
* graph.c: Likewise.
* graphite-blocking.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-isl-ast-to-gimple.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* haifa-sched.c: Likewise.
* hw-doloop.c: Likewise.
* ifcvt.c: Likewise.
* init-regs.c: Likewise.
* input.c: Likewise.
* internal-fn.c: Likewise.
* ipa-chkp.c: Likewise.
* ipa-comdats.c: Likewise.
* ipa-cp.c: Likewise.
* ipa-devirt.c: Likewise.
* ipa-icf-gimple.c: Likewise.
* ipa-icf.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-inline-transform.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-polymorphic-call.c: Likewise.
* ipa-profile.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-ref.c: Likewise.
* ipa-reference.c: Likewise.
* ipa-split.c: Likewise.
* ipa-utils.c: Likewise.
* ipa-visibility.c: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-conflicts.c: Likewise.
* ira-costs.c: Likewise.
* ira-emit.c: Likewise.
* ira-lives.c: Likewise.
* ira.c: Likewise.
* jump.c: Likewise.
* langhooks.c: Likewise.
* lcm.c: Likewise.
* loop-doloop.c: Likewise.
* loop-init.c: Likewise.
* loop-invariant.c: Likewise.
* loop-iv.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lra-assigns.c: Likewise.
* lra-coalesce.c: Likewise.
* lra-constraints.c: Likewise.
* lra-eliminations.c: Likewise.
* lra-lives.c: Likewise.
* lra-remat.c: Likewise.
* lra-spills.c: Likewise.
* lra.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-compress.c: Likewise.
* lto-opts.c: Likewise.
* lto-section-in.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* mcf.c: Likewise.
* mode-switching.c: Likewise.
* modulo-sched.c: Likewise.
* omega.c: Likewise.
* omp-low.c: Likewise.
* optabs.c: Likewise.
* opts-global.c: Likewise.
* opts.h: Likewise.
* passes.c: Likewise.
* plugin.c: Likewise.
* postreload-gcse.c: Likewise.
* postreload.c: Likewise.
* predict.c: Likewise.
* pretty-print.h: Likewise.
* print-rtl.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* real.c: Likewise.
* realmpfr.c: Likewise.
* recog.c: Likewise.
* ree.c: Likewise.
* reg-stack.c: Likewise.
* regcprop.c: Likewise.
* reginfo.c: Likewise.
* regrename.c: Likewise.
* regstat.c: Likewise.
* reload.c: Likewise.
* reload1.c: Likewise.
* reorg.c: Likewise.
* resource.c: Likewise.
* rtl-chkp.c: Likewise.
* rtl-error.c: Likewise.
* rtlanal.c: Likewise.
* rtlhooks.c: Likewise.
* sanopt.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-rgn.c: Likewise.
* sched-vis.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* shrink-wrap.c: Likewise.
* simplify-rtx.c: Likewise.
* stack-ptr-mod.c: Likewise.
* statistics.c: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* streamer-hooks.c: Likewise.
* stringpool.c: Likewise.
* symtab.c: Likewise.
* target-globals.c: Likewise.
* targhooks.c: Likewise.
* toplev.c: Likewise.
* tracer.c: Likewise.
* trans-mem.c: Likewise.
* tree-affine.c: Likewise.
* tree-browser.c: Likewise.
* tree-call-cdce.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chkp-opt.c: Likewise.
* tree-chkp.c: Likewise.
* tree-chrec.c: Likewise.
* tree-complex.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-dfa.c: Likewise.
* tree-diagnostic.c: Likewise.
* tree-dump.c: Likewise.
* tree-eh.c: Likewise.
* tree-emutls.c: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-iterator.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-nested.c: Likewise.
* tree-nrv.c: Likewise.
* tree-object-size.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-copy.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-dse.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-operands.c: Likewise.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-scopedtables.c: Likewise.
* tree-ssa-sink.c: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-tail-merge.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer-out.c: Likewise.
* tree-streamer.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-tailcall.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vectorizer.c: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* tsan.c: Likewise.
* ubsan.c: Likewise.
* valtrack.c: Likewise.
* value-prof.c: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vmsdbgout.c: Likewise.
* vtable-verify.c: Likewise.
* web.c: Likewise.
* wide-int.cc: Likewise.
* xcoffout.c: Likewise.
* config/aarch64/aarch64-builtins.c: Likewise.
* config/aarch64/aarch64.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/arc/arc.c: Likewise.
* config/arm/aarch-common.c: Likewise.
* config/arm/arm-builtins.c: Likewise.
* config/arm/arm-c.c: Likewise.
* config/arm/arm.c: Likewise.
* config/avr/avr-c.c: Likewise.
* config/avr/avr-log.c: Likewise.
* config/avr/avr.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/cr16/cr16.c: Likewise.
* config/cris/cris.c: Likewise.
* config/darwin-c.c: Likewise.
* config/darwin.c: Likewise.
* config/default-c.c: Likewise.
* config/epiphany/epiphany.c: Likewise.
* config/epiphany/mode-switch-use.c: Likewise.
* config/epiphany/resolve-sw-modes.c: Likewise.
* config/fr30/fr30.c: Likewise.
* config/frv/frv.c: Likewise.
* config/ft32/ft32.c: Likewise.
* config/glibc-c.c: Likewise.
* config/h8300/h8300.c: Likewise.
* config/i386/i386-c.c: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/msformat-c.c: Likewise.
* config/i386/winnt-cxx.c: Likewise.
* config/i386/winnt-stubs.c: Likewise.
* config/i386/winnt.c: Likewise.
* config/ia64/ia64-c.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/lm32/lm32.c: Likewise.
* config/m32c/m32c-pragma.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32r/m32r.c: Likewise.
* config/m68k/m68k.c: Likewise.
* config/mcore/mcore.c: Likewise.
* config/mep/mep-pragma.c: Likewise.
* config/mep/mep.c: Likewise.
* config/microblaze/microblaze-c.c: Likewise.
* config/microblaze/microblaze.c: Likewise.
* config/mips/mips.c: Likewise.
* config/mmix/mmix.c: Likewise.
* config/mn10300/mn10300.c: Likewise.
* config/moxie/moxie.c: Likewise.
* config/msp430/msp430-c.c: Likewise.
* config/msp430/msp430.c: Likewise.
* config/nds32/nds32-cost.c: Likewise.
* config/nds32/nds32-fp-as-gp.c: Likewise.
* config/nds32/nds32-intrinsic.c: Likewise.
* config/nds32/nds32-isr.c: Likewise.
* config/nds32/nds32-md-auxiliary.c: Likewise.
* config/nds32/nds32-memory-manipulation.c: Likewise.
* config/nds32/nds32-pipelines-auxiliary.c: Likewise.
* config/nds32/nds32-predicates.c: Likewise.
* config/nds32/nds32.c: Likewise.
* config/nios2/nios2.c: Likewise.
* config/nvptx/nvptx.c: Likewise.
* config/pa/pa.c: Likewise.
* config/pdp11/pdp11.c: Likewise.
* config/rl78/rl78-c.c: Likewise.
* config/rl78/rl78.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/s390/s390-c.c: Likewise.
* config/s390/s390.c: Likewise.
* config/sh/sh-c.c: Likewise.
* config/sh/sh-mem.cc: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/sh_optimize_sett_clrt.cc: Likewise.
* config/sh/sh_treg_combine.cc: Likewise.
* config/sol2-c.c: Likewise.
* config/sol2-cxx.c: Likewise.
* config/sol2-stubs.c: Likewise.
* config/sol2.c: Likewise.
* config/sparc/sparc-c.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu-c.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/tilegx/mul-tables.c: Likewise.
* config/tilegx/tilegx-c.c: Likewise.
* config/tilegx/tilegx.c: Likewise.
* config/tilepro/mul-tables.c: Likewise.
* config/tilepro/tilepro-c.c: Likewise.
* config/tilepro/tilepro.c: Likewise.
* config/v850/v850-c.c: Likewise.
* config/v850/v850.c: Likewise.
* config/vax/vax.c: Likewise.
* config/visium/visium.c: Likewise.
* config/vms/vms-c.c: Likewise.
* config/vms/vms.c: Likewise.
* config/vxworks.c: Likewise.
* config/winnt-c.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
ada
* ada/gcc-interface/cuintp.c: Do not include input.h, line-map.h or
is-a.h.
* ada/gcc-interface/decl.c: Likewise.
* ada/gcc-interface/misc.c: Likewise.
* ada/gcc-interface/targtyps.c: Likewise.
* ada/gcc-interface/trans.c: Likewise.
* ada/gcc-interface/utils.c: Likewise.
* ada/gcc-interface/utils2.c: Likewise.
c
* c/c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
* c/c-aux-info.c: Likewise.
* c/c-convert.c: Likewise.
* c/c-decl.c: Likewise.
* c/c-errors.c: Likewise.
* c/c-lang.c: Likewise.
* c/c-objc-common.c: Likewise.
* c/c-parser.c: Likewise.
* c/c-typeck.c: Likewise.
c-family
* c-family/array-notation-common.c: Do not include input.h, line-map.h
or is-a.h.
* c-family/c-ada-spec.c: Likewise.
* c-family/c-cilkplus.c: Likewise.
* c-family/c-common.c: Likewise.
* c-family/c-common.h: Likewise.
* c-family/c-cppbuiltin.c: Likewise.
* c-family/c-dump.c: Likewise.
* c-family/c-format.c: Likewise.
* c-family/c-gimplify.c: Likewise.
* c-family/c-indentation.c: Likewise.
* c-family/c-lex.c: Likewise.
* c-family/c-omp.c: Likewise.
* c-family/c-opts.c: Likewise.
* c-family/c-pch.c: Likewise.
* c-family/c-ppoutput.c: Likewise.
* c-family/c-pragma.c: Likewise.
* c-family/c-pretty-print.c: Likewise.
* c-family/c-semantics.c: Likewise.
* c-family/c-ubsan.c: Likewise.
* c-family/cilk.c: Likewise.
* c-family/stub-objc.c: Likewise.
common
* common/common-target.h: Do not include input.h, line-map.h or is-a.h.
* common/common-targhooks.c: Likewise.
cp
* cp/call.c: Do not include input.h, line-map.h or is-a.h.
* cp/class.c: Likewise.
* cp/constexpr.c: Likewise.
* cp/cp-array-notation.c: Likewise.
* cp/cp-gimplify.c: Likewise.
* cp/cp-lang.c: Likewise.
* cp/cp-objcp-common.c: Likewise.
* cp/cp-tree.h: Likewise.
* cp/cp-ubsan.c: Likewise.
* cp/cvt.c: Likewise.
* cp/decl.c: Likewise.
* cp/decl2.c: Likewise.
* cp/dump.c: Likewise.
* cp/error.c: Likewise.
* cp/except.c: Likewise.
* cp/expr.c: Likewise.
* cp/friend.c: Likewise.
* cp/init.c: Likewise.
* cp/lambda.c: Likewise.
* cp/lex.c: Likewise.
* cp/mangle.c: Likewise.
* cp/method.c: Likewise.
* cp/name-lookup.c: Likewise.
* cp/optimize.c: Likewise.
* cp/parser.c: Likewise.
* cp/pt.c: Likewise.
* cp/ptree.c: Likewise.
* cp/repo.c: Likewise.
* cp/rtti.c: Likewise.
* cp/search.c: Likewise.
* cp/semantics.c: Likewise.
* cp/tree.c: Likewise.
* cp/typeck.c: Likewise.
* cp/typeck2.c: Likewise.
* cp/vtable-class-hierarchy.c: Likewise.
fortran
* fortran/convert.c: Do not include input.h, line-map.h or is-a.h.
* fortran/cpp.c: Likewise.
* fortran/decl.c: Likewise.
* fortran/f95-lang.c: Likewise.
* fortran/gfortran.h: Likewise.
* fortran/iresolve.c: Likewise.
* fortran/match.c: Likewise.
* fortran/module.c: Likewise.
* fortran/options.c: Likewise.
* fortran/target-memory.c: Likewise.
* fortran/trans-array.c: Likewise.
* fortran/trans-common.c: Likewise.
* fortran/trans-const.c: Likewise.
* fortran/trans-decl.c: Likewise.
* fortran/trans-expr.c: Likewise.
* fortran/trans-intrinsic.c: Likewise.
* fortran/trans-io.c: Likewise.
* fortran/trans-openmp.c: Likewise.
* fortran/trans-stmt.c: Likewise.
* fortran/trans-types.c: Likewise.
* fortran/trans.c: Likewise.
go
* go/go-backend.c: Do not include input.h, line-map.h or is-a.h.
* go/go-gcc.cc: Likewise.
* go/go-lang.c: Likewise.
* go/go-system.h: Likewise.
java
* java/boehm.c: Do not include input.h, line-map.h or is-a.h.
* java/builtins.c: Likewise.
* java/class.c: Likewise.
* java/constants.c: Likewise.
* java/decl.c: Likewise.
* java/except.c: Likewise.
* java/expr.c: Likewise.
* java/java-gimplify.c: Likewise.
* java/jcf-dump.c: Likewise.
* java/jcf-io.c: Likewise.
* java/jcf-parse.c: Likewise.
* java/jvgenmain.c: Likewise.
* java/lang.c: Likewise.
* java/mangle.c: Likewise.
* java/mangle_name.c: Likewise.
* java/resource.c: Likewise.
* java/typeck.c: Likewise.
* java/verify-glue.c: Likewise.
* java/verify-impl.c: Likewise.
jit
* jit/dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
* jit/jit-common.h: Likewise.
* jit/jit-playback.c: Likewise.
lto
* lto/lto-lang.c: Do not include input.h, line-map.h or is-a.h.
* lto/lto-object.c: Likewise.
* lto/lto-partition.c: Likewise.
* lto/lto-symtab.c: Likewise.
* lto/lto.c: Likewise.
objc
* objc/objc-act.c: Do not include input.h, line-map.h or is-a.h.
* objc/objc-encoding.c: Likewise.
* objc/objc-gnu-runtime-abi-01.c: Likewise.
* objc/objc-lang.c: Likewise.
* objc/objc-map.c: Likewise.
* objc/objc-next-runtime-abi-01.c: Likewise.
* objc/objc-next-runtime-abi-02.c: Likewise.
* objc/objc-runtime-shared-support.c: Likewise.
objcp
* objcp/objcp-decl.c: Do not include input.h, line-map.h or is-a.h.
* objcp/objcp-lang.c: Likewise.
From-SVN: r224562
|
|
!GCC$ diagnostic (pragmas) and color)
gcc/fortran/ChangeLog:
2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
Replace all calls to gfc_notify_std_1 with gfc_notify_std and
gfc_warning_1 with gfc_warning.
* decl.c (gfc_verify_c_interop_param): Here.
* resolve.c (resolve_branch): Here.
(resolve_fl_derived): Here.
* dependency.c (gfc_check_argument_var_dependency):
* scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
counter and locations before and after warning.
* gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
Delete.
(gfc_warning_now_at): Declare.
* error.c (gfc_warning_1): Delete.
(gfc_notify_std_1): Delete.
(gfc_warning_now_1): Delete.
(gfc_format_decoder): Handle two locations.
(gfc_diagnostic_build_prefix): Rename as
gfc_diagnostic_build_kind_prefix.
(gfc_diagnostic_build_locus_prefix): Take an expanded_location
instead of diagnostic_info.
(gfc_diagnostic_build_locus_prefix): Add overload that takes two
expanded_location.
(gfc_diagnostic_starter): Handle two locations.
(gfc_warning_now_at): New.
(gfc_diagnostics_init): Initialize caret_chars array.
(gfc_diagnostics_finish): Reset caret_chars array to default.
gcc/cp/ChangeLog:
2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* error.c (cp_diagnostic_starter): Use diagnostic_location
function.
(cp_print_error_function): Likewise.
(cp_printer): Replace locus pointer with accessor function.
gcc/c/ChangeLog:
2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* c-objc-common.c (c_tree_printer): Replace locus pointer with
accessor function.
gcc/ChangeLog:
2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* tree-pretty-print.c (percent_K_format): Replace locus pointer
with accessor function.
* tree-diagnostic.c (diagnostic_report_current_function): Use
diagnostic_location function.
(maybe_unwind_expanded_macro_loc): Likewise.
(virt_loc_aware_diagnostic_finalizer): Likewise.
(default_tree_printer): Replace locus pointer with accessor function.
* diagnostic.c (diagnostic_initialize): Initialize caret_chars array.
(diagnostic_set_info_translated): Initialize second location.
(diagnostic_build_prefix): Use CARET_LINE_MARGIN.
(diagnostic_show_locus): Handle two locations. Call
diagnostic_print_caret_line.
(diagnostic_print_caret_line): New.
(default_diagnostic_starter): Use diagnostic_location function.
(diagnostic_report_diagnostic): Use diagnostic_location function.
(verbatim): Do not set text.locus.
* diagnostic.h (struct diagnostic_info): Remove location field.
(struct diagnostic_context): Make caret_chars an array of two.
(diagnostic_location): New inline.
(diagnostic_expand_location): Handle two locations.
(diagnostic_same_line): New inline.
(diagnostic_print_caret_line): Declare.
(CARET_LINE_MARGIN): New constant.
* pretty-print.c (pp_printf): Do not set text.locus.
(pp_verbatim): Do not set text.locus.
* pretty-print.h (MAX_LOCATIONS_PER_MESSAGE): New constant.
(struct text_info): Replace locus pointer with locations
array. Add accessor functions.
gcc/testsuite/ChangeLog:
2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* lib/gfortran-dg.exp: Update regex to handle two locations for
the same diagnostic without caret.
* gfortran.dg/badline.f: Test also that line numbers are correct
before and after "left but not entered" warning.
From-SVN: r223237
|
|
From-SVN: r219188
|
|
!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
|
|
!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
|
|
2014-05-23 Richard Biener <rguenther@suse.de>
* system.h: Define __STDC_FORMAT_MACROS before
including inttypes.h.
* hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT,
HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC,
HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED,
HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX,
HOST_WIDEST_INT_C): Remove.
(PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define
if C99 inttypes.h is not available.
* coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t.
* gcov-io.h (gcov_type, gcov_type_unsigned): Likewise.
* gcov-io.c (gcov_histo_index): Drop non-64bit hwi case.
* cfgloop.h (struct niter_desc): Use uint64_t for niter field.
* bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters.
(struct output_info): Likewise.
(print_statistics): Adjust.
(dump_bitmap_statistics): Likewise.
* bt-load.c (migrate_btr_defs): Print with PRId64.
* cfg.c (dump_edge_info, dump_bb_info): Likewise.
(MAX_SAFE_MULTIPLIER): Adjust.
* cfghooks.c (dump_bb_for_graph): Print with PRId64.
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee,
dump_cgraph_node): Likewise.
* final.c (dump_basic_block_info): Likewise.
* gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise.
* gcov.c (format_gcov): Likewise.
* ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t
for calculation.
(get_clone_agg_value): Use HOST_WIDE_INT for offset.
* ipa-inline.c (compute_max_insns): Use int64_t for calcuation.
(inline_small_functions, dump_overall_stats, dump_inline_stats):
Use PRId64 for dumping.
* ipa-profile.c (dump_histogram, ipa_profile): Likewise.
* ira-color.c (struct allocno_hard_regs): Use int64_t for cost.
(add_allocno_hard_regs): Adjust.
* loop-doloop.c (doloop_modify): Print using PRId64.
* loop-iv.c (inverse): Compute in uint64_t.
(determine_max_iter, iv_number_of_iterations): Likewise.
* loop-unroll.c (decide_peel_completely, decide_peel_simple):
Print using PRId64.
* lto-streamer-out.c (write_symbol): Use uint64_t.
* mcf.c (CAP_INFINITY): Use int64_t maximum.
(dump_fixup_edge, create_fixup_graph, cancel_negative_cycle,
find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64.
* modulo-sched.c (const_iteration_count): Use int64_t.
(sms_schedule): Dump using PRId64.
* predict.c (dump_prediction): Likewise.
* pretty-print.h (pp_widest_integer): Remove.
* profile.c (get_working_sets, is_edge_inconsistent,
is_inconsistent, read_profile_edge_counts): Dump using PRId64.
* tree-pretty-print.c (pp_double_int): Remove case handling
HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT.
* tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t
and adjust users.
(pass_optimize_bswap::execute): Remove restriction on hosts.
* tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT.
* tree-streamer-out.c (streamer_write_tree_header): Likewise.
* tree.c (widest_int_cst_value): Remove.
* tree.h (widest_int_cst_value): Likewise.
* value-prof.c (dump_histogram_value): Print using PRId64.
* gengtype.c (main): Also inject int64_t.
* ggc-page.c (struct max_alignment): Use int64_t.
* alloc-pool.c (struct allocation_object_def): Likewise.
* ira-conflicts.c (build_conflict_bit_table): Use uint64_t
for computation.
* doc/tm.texi.in: Remove reference to HOST_WIDEST_INT.
* doc/tm.texi: Regenerated.
* gengtype-lex.l (IWORD): Handle [u]int64_t.
* config/sh/sh.c (expand_cbranchdi4): Use gcov_type.
* config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value,
mmix_output_register_setting): Use [u]int64_t in prototypes.
* config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting,
mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str,
mmix_output_octa, mmix_output_shifted_value): Adjust.
(mmix_intval): Adjust. Remove unreachable case.
* config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use
int64_t.
lto/
* lto.c (lto_parse_hex): Use int64_t.
(lto_resolution_read): Likewise.
From-SVN: r210931
|
|
From-SVN: r210113
|
|
From-SVN: r206289
|
|
* diagnostic.c (diagnostic_set_caret_max_width): Use pp_buffer.
* gimple-pretty-print.c (gimple_dump_bb_buff): Likewise.
* pretty-print.c (pp_formatted_text_data): Likewise.
(pp_write_text_to_stream): Likewise.
(pp_write_text_as_dot_label_to_stream): Likewise.
(pp_append_r): Likewise.
(pp_format): Likewise.
(pp_flush): Likewise.
(pp_clear_output_area): Likewise.
(pp_append_text): Likewise.
(pp_formatted_text): Likewise.
(pp_remaining_character_count_for_line): Likewise.
(pp_newline): Likewise.
(pp_character): Likewise.
(output_buffer::~output_buffer): Define.
(pretty_printer::~pretty_printer): Destruct output buffer.
* pretty-print.h (output_buffer::~output_buffer): Declare.
(pretty_printer::~pretty_printer): Declare virtual.
c/
* c-objc-common.c (c_tree_printer): Document the nature of the cast.
(c_initialize_diagnostics): Call a destructor for the early printer.
cp/
* cp-objcp-common.c (cxx_initialize_diagnostics): Call a
destructor for the early printer.
* error.c (type_to_string): Use pp_buffer.
From-SVN: r201956
|
|
* pretty-print.h (pp_newline_and_flush): Declare. Remove macro
definition.
(pp_newline_and_indent): Likewise.
(pp_separate_with): Likewise.
* pretty-print.c (pp_newline_and_flush): Define.
(pp_newline_and_indent): Likewise.
(pp_separate_with): Likewise.
From-SVN: r201940
|
|
* pretty-print.h (output_buffer::output_buffer): Declare.
(pretty_printer::pretty_printer): Likewise.
(pp_construct): Remove.
* pretty-print.c (output_buffer::output_buffer): Define.
(pretty_printer::pretty_printer): Rename from pp_construct. Simplify.
* gimple-pretty-print.c (print_gimple_stmt): Do not call pp_construct.
(print_gimple_expr): Likewise.
(print_gimple_seq): Likewise.
(gimple_dump_bb): Likewise.
* sched-vis.c (dump_value_slim): Likewise.
(dump_insn_slim): Likewise.
(dump_rtl_slim): Likewise.
(str_pattern_slim): Likewise.
* tree-mudflap.c (mf_varname_tree): Likewise.
* graph.c (print_graph_cfg): Likewise.
(start_graph_dump): Likewise.
* tree-pretty-print.c (maybe_init_pretty_print): Likewise. Use
placement-new.
* diagnostic.c (diagnostic_initialize): Simplify early diagnostic
pretty printer initialization.
* coretypes.h (diagnostic_context): Remove superflous type alias
declaration.
(pretty_printer): Likewise. Declare directly as a class.
(pretty_print_info): Remove declaration as class.
* asan.c (asan_emit_stack_protection): Remove call to pp_construct
and pp_clear_output_area.
(asan_add_global): Likewise.
c/
* c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
printer initialization.
c-family/
* c-pretty-print.h (pp_c_pretty_printer_init): Remove.
(c_pretty_printer::c_pretty_printer): Declare.
* c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
c_pretty_printer_init. Adjust.
(print_c_tree): Do not call c_pretty_printer_init.
* c-ada-spec.c (dump_ads): Remove call to pp_construct.
cp/
* error.c (init_error): Remove calls to pp_construct and
pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
* cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
(cxx_pretty_printer_init): Remove.
* cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
Rename from cxx_pretty_printer_init. Adjust.
* cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
initialization of C++ diagnostics pretty printer.
From-SVN: r201918
|
|
* pretty-print.h (pp_base): Remove. Adjust dependent macros.
* diagnostic.h (diagnostic_flush_buffer): Adjust.
* pretty-print.c (pp_formatted_text_data): Likewise.
(pp_indent): Rename from pp_base_indent.
(pp_format): Rename from pp_base_format.
(pp_output_formatted_text): Rename from pp_base_output_formatted_text.
(pp_format_verbatim): Rename from pp_base_format_verbatim.
(pp_flush): Rename from pp_base_flush.
(pp_set_line_maximum_length): Rename from
pp_base_set_line_maximum_length.
(pp_clear_output_area): Rename from pp_base_clear_output_area.
(pp_set_prefix): Rename from pp_base_set_prefix.
(pp_destroy_prefix): Rename from pp_base_destroy_prefix.
(pp_emit_prefix): Rename from pp_base_emit_prefix.
(pp_append_text): Rename from pp_base_append_text.
(pp_formatted_text): Rename from pp_base_formatted_text.
(pp_last_position_in_text): Rename from pp_base_last_position_in_text.
(pp_remaining_character_count_for_line): Rename from
pp_base_remaining_character_count_for_line.
(pp_newline): Rename from pp_base_newline.
(pp_character): Rename from pp_base_character.
(pp_string): Rename from pp_base_string.
(pp_maybe_space): Rename from pp_base_maybe_space.
* asan.c (asan_pp_string): Adjust.
(asan_emit_stack_protection): Likewise.
(asan_add_global): Likewise.
* sched-vis.c (str_pattern_slim): Adjust pretty printer function call.
* tree-mudflap.c (mf_varname_tree): Likewise.
* tree-pretty-print.c (pp_tree_identifier): Rename from
pp_base_tree_identifier.
* tree-pretty-print.h (pp_tree_identifier): Remove macro definition.
Declare as function.
c/
* c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
c-family/
* c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
(pp_base): Remove.
(pp_c_base): Likewise. Adjust users.
* c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
(pp_c_whitespace): Do not call pp_base.
(pp_c_left_paren): Likewise.
(pp_c_right_paren): Likewise.
(pp_c_left_brace): Likewise.
(pp_c_right_brace): Likewise.
(pp_c_left_bracket): Likewise.
(pp_c_right_bracket): Likewise.
(pp_c_dot): Likewise.
(pp_c_ampersand): Likewise.
(pp_c_star): Likewise.
(pp_c_arrow): Likewise.
(pp_c_semicolon): Likewise.
(pp_c_complement): Likewise.
(pp_c_exclamation): Likewise.
(pp_c_direct_declarator): Likewise.
(pp_c_ws_string): Likewise.
(pp_c_identifier): Likewise.
(pp_c_statement): Likewise.
(print_c_tree): Likewise.
cp/
* cxx-pretty-print.h (pp_c_base): Remove.
(cxx_pretty_printer): Derive from c_pretty_printer.
Adjust macros using pp_c_base.
* cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
(pp_cxx_colon_colon): Likewise.
(pp_cxx_separate_with): Likewise.
(pp_cxx_storage_class_specifier): Do not call pp_c_base.
(pp_cxx_expression_list): Likewise.
(pp_cxx_space_for_pointer_operator): Likewise.
(pp_cxx_init_declarator): Likewise.
(pp_cxx_call_argument_list): Likewise.
(pp_cxx_constant): Likewise.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_new_expression): Likewise.
(pp_cxx_unary_expression): Likewise.
(pp_cxx_cast_expression): Likewise.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_expression): Likewise.
(pp_cxx_expression): Likewise.
(pp_cxx_function_specifier): Likewise.
(pp_cxx_decl_specifier_seq): Likewise.
(pp_cxx_simple_type_specifier): Likewise.
(pp_cxx_type_specifier_seq): Likewise.
(pp_cxx_ptr_operator): Likewise.
(pp_cxx_parameter_declaration_clause): Likewise.
(pp_cxx_direct_declarator): Likewise.
(pp_cxx_direct_abstract_declarator): Likewise.
(pp_cxx_type_id): Likewise.
(pp_cxx_statement): Likewise.
(pp_cxx_pretty_printer_init): Tidy.
* error.c (init_error): Do not use pp_base.
(dump_aggr_type): Likewise.
(dump_type_prefix): Likewise.
(dump_type_suffix): Likewise.
(dump_global_iord): Likewise.
(dump_decl): Likewise.
(dump_function_decl): Likewise.
(dump_ref_qualifier): Likewise.
(reinit_cxx_pp): Likewise.
(decl_as_dwarf_string): Likewise.
(lang_decl_dwarf_name): Likewise.
(type_to_string): Likewise.
(cv_to_string): Likewise.
(cxx_print_error_function): Likewise.
(cp_diagnostic_starter): Likewise.
(cp_diagnostic_finalizer): Likewise.
(cp_print_error_function): Likewise.
(print_instantiation_context): Likewise.
(cp_printer): Likewise.
From-SVN: r201479
|
|
* pretty-print.h (pp_bar_bar): New.
(pp_ampersand_ampersand): Likewise.
(pp_less_equal): Likewise.
(pp_greater_equal): Likewise.
* gimple-pretty-print.c (dump_ternary_rhs): Use specialized pretty
printer functions instead of pp_string or operators and punctuators.
(dump_gimple_call): Likewise.
(dump_gimple_omp_for): Likewise.
(dump_gimple_transaction): Likewise.
(dump_gimple_phi): Likewise.
(pp_gimple_stmt_1): Likewise.
* sched-vis.c (print_insn): Likewise.
* tree-mudflap.c (mf_varname_tree): Likewise.
* tree-pretty-print.c (dump_block_node): Likewise.
(dump_generic_node): Likewise.
c-family/
* c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
printer functions instead of pp_string or operators and punctuators.
(dump_generic_ada_node): Likewise.
* c-pretty-print.c (pp_c_type_specifier): Likewise.
(pp_c_relational_expression): Likewise.
(pp_c_logical_or_expression): Likewise.
cp/
* error.c (dump_type_prefix): Use specialized pretty printer
functions instead of pp_string or operators and punctuators.
(dump_decl): Likewise.
(dump_expr): Likewise.
From-SVN: r201474
|
|
* pretty-print.h (pp_underscore): New.
(pp_comma): Tidy.
* gimple-pretty-print.c (dump_unary_rhs): Use specialized pretty
printer functions instead of pp_character.
(dump_binary_rhs): Likewise.
(dump_ternary_rhs): Likewise.
(dump_gimple_call_args): Likewise.
(pp_points_to_solution): Likewise.
(dump_gimple_call): Likewise.
(dump_gimple_switch): Likewise.
(dump_gimple_cond): Likewise.
(dump_gimple_bind): Likewise.
(dump_gimple_try): Likewise.
(dump_gimple_omp_for): Likewise.
(dump_gimple_omp_continue): Likewise.
(dump_gimple_omp_single): Likewise.
(dump_gimple_omp_sections): Likewise.
(dump_gimple_omp_block): Likewise.
(dump_gimple_omp_critical): Likewise.
(dump_gimple_transaction): Likewise.
(dump_gimple_asm): Likewise.
(dump_gimple_phi): Likewise.
(dump_gimple_omp_parallel): Likewise.
(dump_gimple_omp_task): Likewise.
(dump_gimple_omp_atomic_load): Likewise.
(dump_gimple_omp_atomic_store): Likewise.
(dump_gimple_mem_ops): Likewise.
(pp_gimple_stmt_1): Likewise.
(pp_cfg_jump): Likewise.
(dump_implicit_edges): Likewise.
(gimple_dump_bb_for_graph): Likewise.
* graph.c (draw_cfg_node): Likewise.
* langhooks.c (lhd_print_error_function): Likewise.
* sched-vis.c (print_exp): Likewise.
(print_value): Likewise.
(print_pattern): Likewise.
(print_insn): Likewise.
(rtl_dump_bb_for_graph): Likewise.
* tree-pretty-print.c (dump_function_declaration): Likewise.
(dump_array_domain): Likewise.
(dump_omp_clause): Likewise.
(dump_location): Likewise.
(dump_generic_node): Likewise.
(print_struct_decl): Likewise.
* diagnostic.c (diagnostic_show_locus): Use pp_space.
c-family/
* c-ada-spec.c (print_ada_macros): Use specialized pretty printer
functions instead of pp_character.
(pp_ada_tree_identifier): Likewise.
(dump_ada_double_name): Likewise.
(dump_ada_function_declaration): Likewise.
(dump_ada_array_domains): Likewise.
(dump_template_types): Likewise.
(dump_generic_ada_node): Likewise.
(print_ada_declaration): Likewise.
(print_ada_struct_decl): Likewise.
* c-pretty-print.c (pp_c_integer_constant): Likewise.
cp/
* error.c (dump_aggr_type): Use specialized pretty printer
functions instead of pp_character.
(dump_type_prefix): Likewise.
(dump_simple_decl): Likewise.
(type_to_string): Likewise.
From-SVN: r201467
|
|
* opts.c: Include diagnostic-color.h.
(common_handle_option): Handle OPT_fdiagnostics_color_.
* Makefile.in (OBJS-libcommon): Add diagnostic-color.o.
(diagnostic.o, opts.o, pretty-print.o): Depend on diagnostic-color.h.
(diagnostic-color.o): New.
* common.opt (fdiagnostics-color, fdiagnostics-color=): New options.
(diagnostic_color_rule): New enum.
* dwarf2out.c (gen_producer_string): Don't print -fdiagnostics-color*.
* langhooks.c (lhd_print_error_function): Add %r "locus" and %R around
the location string.
* diagnostic.def: Add 3rd argument to DEFINE_DIAGNOSTIC_KIND macros,
either NULL, or color kind.
* diagnostic-color.c: New file.
* diagnostic-color.h: New file.
* diagnostic-core.h (DEFINE_DIAGNOSTIC_KIND): Adjust macro for 3
arguments.
* doc/invoke.texi (-fdiagnostics-color): Document.
* pretty-print.h (pp_show_color): Define.
(struct pretty_print_info): Add show_color field.
* diagnostic.c: Include diagnostic-color.h.
(diagnostic_build_prefix): Adjust for 3 argument DEFINE_DIAGNOSTIC_KIND
macros. Colorize error:, warning: etc. strings and also the location
string.
(diagnostic_show_locus): Colorize the caret line.
* pretty-print.c: Include diagnostic-color.h.
(pp_base_format): Handle %r and %R format specifiers. Colorize strings
inside of %< %> quotes or quoted through q format modifier.
c-family/
* c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
specifiers.
cp/
* error.c (cp_print_error_function,
print_instantiation_partial_context_line,
maybe_print_constexpr_context): Colorize locus strings.
From-SVN: r197841
|
|
From-SVN: r195098
|
|
From-SVN: r194903
|
|
* coretypes.h (struct pretty_print_info): Make a coretype.
(typedef pretty_printer): Likewise.
* pretty-print.h (typedef pretty_printer): Not needed here anymore.
* pretty-print.c (pp_write_text_as_dot_label_to_stream): New function.
* rtl.h (str_pattern_slim): New prototype.
(print_value, print_pattern, print_insn): Adjust prototypes to take
a pretty-printer rather than a char buffer.
* sched-vis.c (safe_concat): Remove.
(print_exp): Print into a pretty-printer.
(print_value): Likewise.
(print_pattern): Likewise.
(print_insn): Likewise.
(print_insn_with_notes): New static function.
(init_rtl_slim_pretty_print): New function.
(dump_value_slim): Simplify. Print into and flush a pretty-printer.
(dump_insn_slim): Likewise.
(dump_rtl_slim): Likewise.
(str_pattern_slim): New function.
* haifa-sched.c (model_recompute): Use str_pattern_slim instead of
static buffers.
(model_record_pressures): Likewise.
(schedule_insn): Likewise.
* sel-sched-dump.c (dump_insn_rtx_1): Likewise.
(sel_prepare_string_for_dot_label): Refer to graph.c CFG dumper code.
* graph.c: Include pretty-print.h.
(init_graph_slim_pretty_print): New function.
(print_escaped_line): Removed here, and reincarnated as
pp_write_text_as_dot_label_to_stream.
(draw_cfg_node): Print into a pretty printer.
(draw_cfg_node_succ_edges): Likewise.
(print_rtl_graph_with_bb): Likewise.
* Makefile.in (graph.o): Fix dependencies.
(tree-optimize.o, toplev.o, sched-vis.o): Likewise.
From-SVN: r193990
|
|
gcc/
* cfg.c (debug_bb): Do not set TDF_BLOCKS.
* cfghooks.c (dump_bb): Honor ~TDF_BLOCKS.
* pretty-print.c (pp_base_flush): Do not add a newline, and do not
clear pp_needs_newline.
* pretty-print.h (pp_newline_and_flush): New macro with the behavior
of pp_base_flush before the above change.
* langhooks.c (lhd_print_error_function): Use pp_newline_and_flush
instead of pp_flush.
* diagnostic.c (diagnostic_finish): Likewise.
(diagnostic_report_diagnostic): Likewise.
(verbatim): Likewise.
(error_recursion): Likewise.
* tree-pretty-print.c (print_generic_stmt): Likewise.
(print_generic_stmt_indented): LIkewise.
* gimple-pretty-print.c (print_gimple_stmt): Likewise.
(print_gimple_seq): Likewise.
(gimple_dump_bb_buff): Likewise.
c-family/
* c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
instead of separate pp_newline and pp_flush.
(print_c_tree): Likewise.
cp/
* error.c (print_instantiation_context): Pretty-print a newline before
diagnostic_flush_buffer.
* cxx-pretty-print.c (pp_cxx_function_definition): Use
pp_newline_and_flush instead of separate pp_newline and pp_flush.
testsuite/
* gcc.dg/tree-prof/update-loopch.c: Ask for dump with blocks info.
* gcc.dg/tree-ssa/attr-hotcold-2.c: Likewise.
* gcc.dg/tree-ssa/pr18133-1.c: Likewise.
From-SVN: r190215
|
|
2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 24985
gcc/
* diagnostic.h (show_caret): Declare.
(caret_max_width): Declare.
(diagnostic_show_locus): Declare.
* diagnostic.c (diagnostic_initialize): Initialize to false.
(diagnostic_show_locus): New.
(diagnostic_report_diagnostic): Call it.
(getenv_columns): New.
(adjust_line): New.
(diagnostic_set_caret_max_width): New.
* input.c (read_line): New.
(location_get_source_line): New.
* input.h (location_get_source_line): Declare.
* toplev.c (general_init): Initialize show_caret from options.
* dwarf2out.c (gen_producer_string): Handle fdiagnostics-show-caret.
* opts.c (common_handle_option): Likewise.
* pretty-print.h (pp_get_prefix): New.
(pp_base_get_prefix): New.
* common.opt (fdiagnostics-show-caret): New option.
* doc/invoke.texi (fdiagnostics-show-caret): Document it.
testsuite/
* lib/prune.exp: Add -fno-diagnostics-show-caret.
libstdc++-v3/
* testsuite/lib/prune.exp: Handle caret.
libmudflap/
* testsuite/lib/libmudflap.exp: Handle caret.
From-SVN: r186305
|
|
2011-09-02 Richard Guenther <rguenther@suse.de>
* pretty-print.h (pp_unsigned_wide_integer): New.
* tree-pretty-print.c (dump_generic_node): Print unsigned
host-wide-int fitting INTEGER_CSTs with pp_unsigned_wide_integer.
From-SVN: r178479
|
|
gcc/
* pretty-print.h (ATTRIBUTE_GCC_PPDIAG): Use GCC_DIAG_STYLE if set.
gcc/c-family/
* c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
From-SVN: r174770
|
|
2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
* toplev.h: Do not include diagnostic-core.h.
Include diagnostic-core.h in every file that includes toplev.h.
* c-tree.h: Do not include toplev.h.
* pretty-print.h: Update comment.
* Makefile.in: Update dependencies.
* alias.c: Include diagnostic-core.h in every file that includes
toplev.h.
* attribs.c: Likewise.
* auto-inc-dec.c: Likewise.
* bb-reorder.c: Likewise.
* bt-load.c: Likewise.
* caller-save.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgbuild.c: Likewise.
* cfgcleanup.c: Likewise.
* cfghooks.c: Likewise.
* cfgloop.c: Likewise.
* combine.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/arc/arc.c: Likewise.
* config/arm/arm.c: Likewise.
* config/arm/pe.c: Likewise.
* config/avr/avr.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/cris/cris.c: Likewise.
* config/crx/crx.c: Likewise.
* config/darwin-c.c: Likewise.
* config/darwin.c: Likewise.
* config/fr30/fr30.c: Likewise.
* config/frv/frv.c: Likewise.
* config/h8300/h8300.c: Likewise.
* config/host-darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/netware.c: Likewise.
* config/i386/nwld.c: Likewise.
* config/i386/winnt-cxx.c: Likewise.
* config/i386/winnt-stubs.c: Likewise.
* config/i386/winnt.c: Likewise.
* config/ia64/ia64-c.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/lm32/lm32.c: Likewise.
* config/m32c/m32c-pragma.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32r/m32r.c: Likewise.
* config/m68hc11/m68hc11.c: Likewise.
* config/m68k/m68k.c: Likewise.
* config/mcore/mcore.c: Likewise.
* config/mep/mep-pragma.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mmix/mmix.c: Likewise.
* config/mn10300/mn10300.c: Likewise.
* config/moxie/moxie.c: Likewise.
* config/pa/pa.c: Likewise.
* config/pdp11/pdp11.c: Likewise.
* config/picochip/picochip.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/s390/s390.c: Likewise.
* config/score/score.c: Likewise.
* config/score/score3.c: Likewise.
* config/score/score7.c: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/symbian-base.c: Likewise.
* config/sh/symbian-c.c: Likewise.
* config/sh/symbian-cxx.c: Likewise.
* config/sol2-c.c: Likewise.
* config/sol2.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/v850/v850-c.c: Likewise.
* config/v850/v850.c: Likewise.
* config/vax/vax.c: Likewise.
* config/vxworks.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* convert.c: Likewise.
* cse.c: Likewise.
* cselib.c: Likewise.
* dbgcnt.c: Likewise.
* dbxout.c: Likewise.
* ddg.c: Likewise.
* dominance.c: Likewise.
* emit-rtl.c: Likewise.
* explow.c: Likewise.
* expmed.c: Likewise.
* fixed-value.c: Likewise.
* fold-const.c: Likewise.
* fwprop.c: Likewise.
* gcse.c: Likewise.
* ggc-common.c: Likewise.
* ggc-page.c: Likewise.
* ggc-zone.c: Likewise.
* gimple-low.c: Likewise.
* gimplify.c: Likewise.
* graph.c: Likewise.
* haifa-sched.c: Likewise.
* ifcvt.c: Likewise.
* implicit-zee.c: Likewise.
* integrate.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-conflicts.c: Likewise.
* ira-costs.c: Likewise.
* ira-lives.c: Likewise.
* ira.c: Likewise.
* lists.c: Likewise.
* loop-doloop.c: Likewise.
* loop-iv.c: Likewise.
* lto-opts.c: Likewise.
* lto-symtab.c: Likewise.
* main.c: Likewise.
* modulo-sched.c: Likewise.
* optabs.c: Likewise.
* params.c: Likewise.
* plugin.c: Likewise.
* postreload-gcse.c: Likewise.
* postreload.c: Likewise.
* predict.c: Likewise.
* profile.c: Likewise.
* real.c: Likewise.
* regcprop.c: Likewise.
* reginfo.c: Likewise.
* regmove.c: Likewise.
* reorg.c: Likewise.
* resource.c: Likewise.
* rtl.c: Likewise.
* rtlanal.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-rgn.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* simplify-rtx.c: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* targhooks.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-dump.c: Likewise.
* tree-eh.c: Likewise.
* tree-inline.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-object-size.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-phinodes.c: Likewise.
* tree-profile.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vrp.c: Likewise.
* varasm.c: Likewise.
* vec.c: Likewise.
* web.c: Likewise.
* xcoffout.c: Likewise.
c-family/
* c-common.h: Include diagnostic-core.h. Error if already
included.
* c-semantics.c: Do not define GCC_DIAG_STYLE here.
cp/
* cp-tree.h: Do not include toplev.h.
java/
* boehm.c: Include diagnostic-core.h in every file that includes
toplev.h.
* class.c: Likewise.
* constants.c: Likewise.
* decl.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* jcf-parse.c: Likewise.
* mangle.c: Likewise.
* mangle_name.c: Likewise.
* resource.c: Likewise.
* typeck.c: Likewise.
* verify-glue.c: Likewise.
ada/
* gcc-interface/utils.c: Include diagnostic-core.h in every file
that includes toplev.h.
lto/
* lto-coff.c: Include diagnostic-core.h in every file that
includes toplev.h.
* lto-elf.c: Likewise.
* lto-lang.c: Likewise.
* lto-macho.c: Likewise.
From-SVN: r161943
|
|
* pretty-print.c: Don't include ggc.h.
(identifier_to_locale_alloc, identifier_to_locale_free): Define.
(identifier_to_locale): Use them for allocation.
* pretty-print.h (identifier_to_locale_alloc,
identifier_to_locale_free): Declare.
* toplev.c (alloc_for_identifier_to_locale): New.
(general_init): Set identifier_to_locale_alloc and
identifier_to_locale_free.
* Makefile.in (pretty-print.o): Update dependencies.
From-SVN: r159898
|
|
langhooks-def.h.
* diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h or
langhooks-def.h.
(diagnostic_initialize): Initialize x_data not last_function.
(diagnostic_report_current_function): Move to tree-diagnostic.c.
(default_diagnostic_starter): Call
diagnostic_report_current_module not
diagnostic_report_current_function.
(diagnostic_report_diagnostic): Initialize x_data not
abstract_origin.
(verbatim): Likewise.
* diagnostic.h (struct diagnostic_info): Change abstract_origin to
x_data.
(struct diagnostic_context): Change last_function to x_data.
(diagnostic_auxiliary_data): Replace with
diagnostic_context_auxiliary_data and
diagnostic_info_auxiliary_data.
(diagnostic_last_function_changed, diagnostic_set_last_function,
diagnostic_report_current_function): Move to tree-diagnostic.h.
(print_declaration, dump_generic_node, print_generic_stmt,
print_generic_stmt_indented, print_generic_expr,
print_generic_decl, debug_c_tree, dump_omp_clauses,
print_call_name, debug_generic_expr, debug_generic_stmt,
debug_tree_chain, default_tree_printer): Move to
tree-pretty-print.h.
(debug_gimple_stmt, debug_gimple_seq, print_gimple_seq,
print_gimple_stmt, print_gimple_expr, dump_gimple_stmt): Move to
gimple-pretty-print.h.
* pretty-print.c: Don't include tree.h
(pp_base_format): Don't handle %K here.
(pp_base_tree_identifier): Move to tree-pretty-print.c.
* pretty-print.h (text_info): Change abstract_origin to x_data.
(pp_tree_identifier, pp_unsupported_tree,
pp_base_tree_identifier): Move to tree-pretty-print.h.
* gimple-pretty-print.h, tree-diagnostic.c, tree-diagnostic.h,
tree-pretty-print.h: New files.
* tree-pretty-print.c: Include tree-pretty-print.h.
(percent_K_format): New. Moved from pretty-print.c.
(pp_base_tree_identifier): Move from pretty-print.c.
* c-objc-common.c: Include tree-pretty-print.h.
(c_tree_printer): Handle %K here.
* langhooks.c: Include tree-diagnostic.h.
(lhd_print_error_function): Use diagnostic_abstract_origin macro.
* toplev.c: Include tree-diagnostic.h and tree-pretty-print.h.
(default_tree_printer): Handle %K using percent_K_format.
(general_init): Use default_tree_diagnostic_starter.
* tree.c: Include tree-diagnostic.h and tree-pretty-print.h.
(free_lang_data): Use default_tree_diagnostic_starter.
* c-pretty-print.c: Include tree-pretty-print.h.
* cfgexpand.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* cgraphunit.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* dwarf2out.c: Include tree-pretty-print.h.
* except.c: Include tree-pretty-print.h.
* gimple-pretty-print.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* gimplify.c: Include tree-pretty-print.h.
* graphite-poly.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* ipa-cp.c: Include tree-pretty-print.h.
* ipa-inline.c: Include gimple-pretty-print.h.
* ipa-prop.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* ipa-pure-const.c: Include gimple-pretty-print.h.
* ipa-struct-reorg.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* ipa-type-escape.c: Include tree-pretty-print.h.
* print-rtl.c: Include tree-pretty-print.h.
* print-tree.c: Include gimple-pretty-print.h.
* sese.c: Include tree-pretty-print.h.
* tree-affine.c: Include tree-pretty-print.h.
* tree-browser.c: Include tree-pretty-print.h.
* tree-call-cdce.c: Include gimple-pretty-print.h.
* tree-cfg.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-chrec.c: Include tree-pretty-print.h.
* tree-data-ref.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-dfa.c: Include tree-pretty-print.h.
* tree-if-conv.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-inline.c: Include tree-pretty-print.h.
* tree-into-ssa.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-nrv.c: Include tree-pretty-print.h.
* tree-object-size.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-outof-ssa.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-parloops.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-predcom.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-scalar-evolution.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-sra.c: Include tree-pretty-print.h.
* tree-ssa-address.c: Include tree-pretty-print.h.
* tree-ssa-alias.c: Include tree-pretty-print.h.
* tree-ssa-ccp.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-coalesce.c: Include tree-pretty-print.h.
* tree-ssa-copy.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-copyrename.c: Include tree-pretty-print.h.
* tree-ssa-dce.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-dom.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-dse.c: Include gimple-pretty-print.h.
* tree-ssa-forwprop.c: Include tree-pretty-print.h.
* tree-ssa-ifcombine.c: Include tree-pretty-print.h.
* tree-ssa-live.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-loop-im.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-loop-ivcanon.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-loop-ivopts.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-loop-niter.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-loop-prefetch.c: Include tree-pretty-print.h.
* tree-ssa-math-opts.c: Include gimple-pretty-print.h.
* tree-ssa-operands.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-phiprop.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-pre.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-propagate.c: Include gimple-pretty-print.h.
* tree-ssa-reassoc.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-sccvn.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-sink.c: Include gimple-pretty-print.h.
* tree-ssa-ter.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-ssa-uninit.c: Include gimple-pretty-print.h.
* tree-ssa.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-stdarg.c: Include gimple-pretty-print.h.
* tree-switch-conversion.c: Include gimple-pretty-print.h.
* tree-tailcall.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-vect-data-refs.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-vect-loop-manip.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-vect-loop.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-vect-patterns.c: Include gimple-pretty-print.h.
* tree-vect-slp.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-vect-stmts.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* tree-vectorizer.c: Include tree-pretty-print.h.
* tree-vrp.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* value-prof.c: Include tree-pretty-print.h and
gimple-pretty-print.h.
* var-tracking.c: Include tree-pretty-print.h.
* Makefile.in (OBJS-common): Add tree-diagnostic.o.
(tree-diagnostic.o): New dependencies.
(c-objc-common.o, c-pretty-print.o, langhooks.o, tree.o,
tree-inline.o, print-tree.o, stor-layout.o, tree-ssa-uninit.o,
tree-ssa.o, tree-into-ssa.o, tree-ssa-ter.o, tree-ssa-coalesce.o,
tree-outof-ssa.o, tree-ssa-forwprop.o, tree-ssa-phiprop.o,
tree-ssa-ifcombine.o, tree-nrv.o, tree-ssa-copy.o,
tree-ssa-propagate.o, tree-ssa-dom.o, tree-ssa-uncprop.o,
tree-ssa-live.o, tree-ssa-copyrename.o, tree-ssa-pre.o,
tree-ssa-sccvn.o, tree-vrp.o, tree-cfg.o, tree-tailcall.o,
tree-ssa-sink.o, tree-if-conv.o, tree-dfa.o, tree-ssa-operands.o,
tree-ssa-address.o, tree-ssa-loop-niter.o,
tree-ssa-loop-ivcanon.o, tree-ssa-loop-prefetch.o, tree-predcom.o,
tree-ssa-loop-ivopts.o, tree-affine.o, tree-ssa-loop-im.o,
tree-ssa-math-opts.o, tree-ssa-alias.o, tree-ssa-reassoc.o,
gimplify.o, tree-browser.o, tree-chrec.o, tree-scalar-evolution.o,
tree-data-ref.o, sese.o, graphite-poly.o, tree-vect-loop.o,
tree-vect-loop-manip.o, tree-vect-patterns.o, tree-vect-slp.o,
tree-vect-stmts.o, tree-vect-data-refs.o, tree-vectorizer.o,
tree-parloops.o, tree-stdarg.o, tree-object-size.o,
gimple-pretty-print.o, tree-pretty-print.o, diagnostic.o,
toplev.o, print-rtl.o, except.o, dwarf2out.o, cgraphunit.o,
ipa-prop.o, ipa-cp.o, ipa-inline.o, ipa-pure-const.o,
ipa-type-escape.o, ipa-struct-reorg.o, tree-ssa-dce.o,
tree-call-cdce.o, tree-ssa-ccp.o, tree-sra.o,
tree-switch-conversion.o, var-tracking.o, value-prof.o,
cfgexpand.o, pretty-print.o): Update dependencies.
cp:
* error.c: Include tree-diagnostic.h and tree-pretty-print.h.
(cp_print_error_function): Use diagnostic_abstract_origin macro.
(cp_printer): Handle %K here using percent_K_format.
* cxx-pretty-print.c: Include tree-pretty-print.h.
* Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
dependencies.
From-SVN: r159685
|
|
2009-11-25 H.J. Lu <hongjiu.lu@intel.com>
* alias.c: Remove trailing white spaces.
* alloc-pool.c: Likewise.
* alloc-pool.h: Likewise.
* attribs.c: Likewise.
* auto-inc-dec.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* bt-load.c: Likewise.
* builtins.c: Likewise.
* builtins.def: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-decl.c: Likewise.
* c-format.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-parser.c: Likewise.
* c-pretty-print.c: Likewise.
* c-tree.h: Likewise.
* c-typeck.c: Likewise.
* caller-save.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h: Likewise.
* cfglayout.c: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* cgraphbuild.c: Likewise.
* cgraphunit.c: Likewise.
* cif-code.def: Likewise.
* collect2.c: Likewise.
* combine.c: Likewise.
* convert.c: Likewise.
* coverage.c: Likewise.
* crtstuff.c: Likewise.
* cse.c: Likewise.
* cselib.c: Likewise.
* dbgcnt.c: Likewise.
* dbgcnt.def: Likewise.
* dbgcnt.h: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* ddg.c: Likewise.
* ddg.h: Likewise.
* defaults.h: Likewise.
* df-byte-scan.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* df.h: Likewise.
* dfp.c: Likewise.
* diagnostic.c: Likewise.
* diagnostic.h: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* double-int.c: Likewise.
* double-int.h: Likewise.
* dse.c: Likewise.
* dwarf2asm.c: Likewise.
* dwarf2asm.h: Likewise.
* dwarf2out.c: Likewise.
* ebitmap.c: Likewise.
* ebitmap.h: Likewise.
* emit-rtl.c: Likewise.
* et-forest.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* expmed.c: Likewise.
* expr.c: Likewise.
* expr.h: Likewise.
* final.c: Likewise.
* flags.h: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* fwprop.c: Likewise.
* gcc.c: Likewise.
* gcov-dump.c: Likewise.
* gcov-io.c: Likewise.
* gcov-io.h: Likewise.
* gcov.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* genautomata.c: Likewise.
* genchecksum.c: Likewise.
* genconfig.c: Likewise.
* genflags.c: Likewise.
* gengtype-parse.c: Likewise.
* gengtype.c: Likewise.
* gengtype.h: Likewise.
* genmddeps.c: Likewise.
* genmodes.c: Likewise.
* genopinit.c: Likewise.
* genpreds.c: Likewise.
* gensupport.c: Likewise.
* ggc-common.c: Likewise.
* ggc-page.c: Likewise.
* ggc-zone.c: Likewise.
* ggc.h: Likewise.
* gimple-iterator.c: Likewise.
* gimple-low.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimple.c: Likewise.
* gimple.def: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* graphds.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* gthr-nks.h: Likewise.
* gthr-posix.c: Likewise.
* gthr-posix.h: Likewise.
* gthr-posix95.h: Likewise.
* gthr-single.h: Likewise.
* gthr-tpf.h: Likewise.
* gthr-vxworks.h: Likewise.
* gthr.h: Likewise.
* haifa-sched.c: Likewise.
* hard-reg-set.h: Likewise.
* hooks.c: Likewise.
* hooks.h: Likewise.
* hosthooks.h: Likewise.
* hwint.h: Likewise.
* ifcvt.c: Likewise.
* incpath.c: Likewise.
* init-regs.c: Likewise.
* integrate.c: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-reference.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* ipa-utils.c: Likewise.
* ipa-utils.h: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-conflicts.c: Likewise.
* ira-costs.c: Likewise.
* ira-emit.c: Likewise.
* ira-int.h: Likewise.
* ira-lives.c: Likewise.
* ira.c: Likewise.
* jump.c: Likewise.
* lambda-code.c: Likewise.
* lambda-mat.c: Likewise.
* lambda-trans.c: Likewise.
* lambda.h: Likewise.
* langhooks.c: Likewise.
* lcm.c: Likewise.
* libgcov.c: Likewise.
* lists.c: Likewise.
* loop-doloop.c: Likewise.
* loop-init.c: Likewise.
* loop-invariant.c: Likewise.
* loop-iv.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-compress.c: Likewise.
* lto-opts.c: Likewise.
* lto-section-in.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* lto-streamer.h: Likewise.
* lto-symtab.c: Likewise.
* lto-wpa-fixup.c: Likewise.
* matrix-reorg.c: Likewise.
* mcf.c: Likewise.
* mode-switching.c: Likewise.
* modulo-sched.c: Likewise.
* omega.c: Likewise.
* omega.h: Likewise.
* omp-low.c: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* opts-common.c: Likewise.
* opts.c: Likewise.
* params.def: Likewise.
* params.h: Likewise.
* passes.c: Likewise.
* plugin.c: Likewise.
* postreload-gcse.c: Likewise.
* postreload.c: Likewise.
* predict.c: Likewise.
* predict.def: Likewise.
* pretty-print.c: Likewise.
* pretty-print.h: Likewise.
* print-rtl.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* read-rtl.c: Likewise.
* real.c: Likewise.
* recog.c: Likewise.
* reg-stack.c: Likewise.
* regcprop.c: Likewise.
* reginfo.c: Likewise.
* regmove.c: Likewise.
* regrename.c: Likewise.
* regs.h: Likewise.
* regstat.c: Likewise.
* reload.c: Likewise.
* reload1.c: Likewise.
* resource.c: Likewise.
* rtl.c: Likewise.
* rtl.def: Likewise.
* rtl.h: Likewise.
* rtlanal.c: Likewise.
* sbitmap.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-int.h: Likewise.
* sched-rgn.c: Likewise.
* sched-vis.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-dump.h: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched-ir.h: Likewise.
* sel-sched.c: Likewise.
* sel-sched.h: Likewise.
* sese.c: Likewise.
* sese.h: Likewise.
* simplify-rtx.c: Likewise.
* stack-ptr-mod.c: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* stringpool.c: Likewise.
* stub-objc.c: Likewise.
* sync-builtins.def: Likewise.
* target-def.h: Likewise.
* target.h: Likewise.
* targhooks.c: Likewise.
* targhooks.h: Likewise.
* timevar.c: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* toplev.h: Likewise.
* tracer.c: Likewise.
* tree-affine.c: Likewise.
* tree-affine.h: Likewise.
* tree-browser.def: Likewise.
* tree-call-cdce.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-complex.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-dfa.c: Likewise.
* tree-dump.c: Likewise.
* tree-dump.h: Likewise.
* tree-eh.c: Likewise.
* tree-flow-inline.h: Likewise.
* tree-flow.h: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-nested.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-nrv.c: Likewise.
* tree-object-size.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-pass.h: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-copy.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-dse.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-operands.c: Likewise.
* tree-ssa-operands.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sink.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-tailcall.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vectorizer.c: Likewise.
* tree-vectorizer.h: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* tree.def: Likewise.
* tree.h: Likewise.
* treestruct.def: Likewise.
* unwind-compat.c: Likewise.
* unwind-dw2-fde-glibc.c: Likewise.
* unwind-dw2.c: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vec.c: Likewise.
* vec.h: Likewise.
* vmsdbgout.c: Likewise.
* web.c: Likewise.
* xcoffout.c: Likewise.
From-SVN: r154645
|
|
* pretty-print.h (struct pretty_print_info): Add
translate_identifiers.
(pp_translate_identifiers): New.
(pp_identifier): Only conditionally translate identifier to locale
character set.
* pretty-print.c (pp_construct): Set pp_translate_identifiers.
(pp_base_tree_identifier): Only conditionally translate identifier
to locale character set.
* c-pretty-print.c (M_): Define.
(pp_c_type_specifier, pp_c_primary_expression): Mark English
fragments for conditional translation with M_.
* tree-pretty-print.c (maybe_init_pretty_print): Disable
identifier translation.
cp:
* call.c (name_as_c_string): Call type_as_string_translate.
Translate identifiers to locale character set.
* cp-tree.h (lang_decl_name): Update prototype.
(type_as_string_translate, decl_as_string_translate,
cxx_printable_name_translate): Declare.
* cxx-pretty-print.c (M_): Define.
(pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
English fragments for conditional translation with M_.
* decl.c (grokdeclarator): Translate identifiers to locale
character set for diagnostics.
* error.c (M_): Define.
(dump_template_bindings, dump_type, dump_aggr_type,
dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
dump_function_decl, dump_template_parms, dump_expr,
dump_binary_op, op_to_string, assop_to_string): Mark English
fragments for conditional translation with M_.
(type_as_string): Disable translation of identifiers.
(type_as_string_translate): New.
(expr_as_string): Disable translation of identifiers.
(decl_as_string): Disable translation of identifiers.
(decl_as_string_translate): New.
(lang_decl_name): Add parameter translate.
(args_to_string): Call type_as_string_translate.
(cp_print_error_function): Call cxx_printable_name_translate.
(print_instantiation_full_context,
print_instantiation_partial_context): Call
decl_as_string_translate.
* parser.c (cp_lexer_get_preprocessor_token): Use %qE for
identifier in diagnostic.
* tree.c (cxx_printable_name): Change to
cxx_printable_name_internal. Add parameter translate.
(cxx_printable_name, cxx_printable_name_translate): New wrappers
round cxx_printable_name_internal.
objc:
* objc-act.c: Include intl.h.
(objc_lookup_protocol): Use complete sentences for diagnostics
with %qE for identifiers and translating results of
gen_type_name_0 to locale character set.
(objc_check_decl, check_protocol_recursively,
lookup_and_install_protocols, objc_build_string_object,
objc_get_class_reference, objc_declare_alias, objc_declare_class,
objc_get_class_ivars, error_with_ivar, check_duplicates,
objc_finish_message_expr, objc_build_protocol_expr,
objc_build_selector_expr, build_ivar_reference, objc_add_method,
add_category, add_instance_variable, objc_is_public,
check_methods, check_methods_accessible, check_protocol,
start_class, finish_class, start_protocol, really_start_method,
get_super_receiver, objc_lookup_ivar): Use %E and %qE for
identifiers in diagnostics. Translate generated text to locale
character set as needed.
(check_protocol, check_protocols): Change name parameter to type
tree.
(lang_report_error_function): Remove.
From-SVN: r147333
|
|
* intl.c (locale_encoding, locale_utf8): New.
(gcc_init_libintl): Initialize locale_encoding and locale_utf8.
* intl.h (locale_encoding, locale_utf8): Declare.
* pretty-print.c: Include ggc.h. Include iconv.h if HAVE_ICONV.
(pp_base_tree_identifier, decode_utf8_char, identifier_to_locale):
New.
* pretty-print.h (pp_identifier): Call identifier_to_locale on ID
argument.
(pp_tree_identifier): Define to call pp_base_tree_identifier.
(pp_base_tree_identifier): Declare as function.
(identifier_to_locale): Declare.
* Makefile.in (pretty-print.o): Update dependencies.
* varasm.c (finish_aliases_1): Use %qE for identifiers in
diagnostics.
testsuite:
* gcc.dg/attr-alias-5.c, gcc.dg/ucnid-7.c: New tests.
From-SVN: r147096
|
|
gcc/
* cgraph.c: Fix typos in comments.
(cgraph_availability_names): Fix string typo.
* fold-const.c: Fix typos in comments.
(fold_binary): Fix typo in warning.
* genautomata.c: Fix typos in comments.
(check_presence_pattern_sets): Fix typo in local variable.
(output_description): Fix typo in output.
* ggc-zone.c (ggc_pch_finish): Fix typo in error message.
* hwint.h: Likewise.
* matrix-reorg.c (check_allocation_function): Likewise.
* omega.c (smooth_weird_equations): Likewise.
* auto-inc-dec.c: Fix typos in comments.
* bb-reorder.c: Likewise.
* builtins.c: Likewise.
* c-common.c: Likewise.
* c-cppbuiltin.c: Likewise.
* c-parser.c: Likewise.
* c-pretty-print.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfglayout.c: Likewise.
* cfgloopmanip.c: Likewise.
* cgraphunit.c: Likewise.
* coverage.c: Likewise.
* dbxout.c: Likewise.
* df-byte-scan.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* dfp.c: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* dse.c: Likewise.
* dwarf2out.c: Likewise.
* emit-rtl.c: Likewise.
* et-forest.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* gcc.c: Likewise.
* gcov-io.c: Likewise.
* gcov.c: Likewise.
* gcse.c: Likewise.
* genattrtab.c: Likewise.
* ggc-page.c: Likewise.
* gimplify.c: Likewise.
* gthr-lynx.h: Likewise.
* haifa-sched.c: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-prop.h: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa.c: Likewise.
* loop-doloop.c: Likewise.
* mips-tfile.c: Likewise.
* mkmap-flat.awk: Likewise.
* mkmap-symver.awk: Likewise.
* modulo-sched.c: Likewise.
* omp-low.c: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* opts.c: Likewise.
* passes.c: Likewise.
* postreload-gcse.c: Likewise.
* postreload.c: Likewise.
* predict.c: Likewise.
* pretty-print.h: Likewise.
* profile.c: Likewise.
* protoize.c: Likewise.
* ra-conflict.c: Likewise.
* real.c: Likewise.
* recog.c: Likewise.
* regclass.c: Likewise.
* regs.h: Likewise.
* reload.c: Likewise.
* rtl-error.c: Likewise.
* rtlanal.c: Likewise.
* scan.h: Likewise.
* sched-rgn.c: Likewise.
* see.c: Likewise.
* stmt.c: Likewise.
* target.h: Likewise.
* tree-dfa.c: Likewise.
* tree-eh.c: Likewise.
* tree-flow-inline.h: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-nested.c: Likewise.
* tree-parloops.c: Likewise.
* tree-pass.h: Likewise.
* tree-pretty-print.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-alias-warnings.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-dse.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa.c: Likewise.
* tree-vect-analyze.c: Likewise.
* tree-vect-transform.c: Likewise.
* tree-vectorizer.c: Likewise.
* tree-vn.c: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* tree.def: Likewise.
* tree.h: Likewise.
* unwind-dw2-fde.c: Likewise.
* unwind.inc: Likewise.
* value-prof.c: Likewise.
* vmsdbgout.c: Likewise.
From-SVN: r136425
|
|
diagnostics.
* builtins.c (expand_builtin, expand_builtin_object_size,
expand_builtin_memory_chk, maybe_emit_chk_warning,
maybe_emit_sprintf_chk_warning): Use new %K format string specifier
for diagnostics.
* expr.c (expand_expr_real_1): Likewise.
* langhooks-def.h (struct diagnostic_info): Add forward decl.
(lhd_print_error_function): Add third argument.
* langhooks.h (struct diagnostic_info): Add forward decl.
(struct lang_hooks): Add third argument to print_error_function.
* diagnostic.h (diagnostic_info): Add abstract_origin field.
(diagnostic_last_function_changed, diagnostic_set_last_function): Add
second argument.
(diagnostic_report_current_function): Likewise.
* toplev.c (announce_function): Pass NULL as second argument to
diagnostic_set_last_function.
* diagnostic.c (diagnostic_report_current_function): Add second
argument, pass it as third argument to lang_hooks.print_error_function.
(default_diagnostic_starter): Pass DIAGNOSTIC as second argument
to diagnostic_report_current_function.
(diagnostic_report_diagnostic): Initialize diagnostic->abstract_origin
and message.abstract_origin.
(verbatim): Initialize abstract_origin.
* pretty-print.h (text_info): Add abstract_origin field.
* pretty-print.c (pp_base_format): Handle %K.
* langhooks.c (lhd_print_error_function): Add third argument. If
diagnostic->abstract_origin, print virtual backtrace.
* c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
gcc_cdiag_char_table, gcc_cxxdiag_char_table): Support %K.
(init_dynamic_diag_info): Likewise.
cp/
* error.c (cxx_print_error_function): Add third argument, pass
it over to lhd_print_error_function.
(cp_print_error_function): If diagnostic->abstract_origin, print
virtual backtrace.
* cp-tree.h (struct diagnostic_info): New forward decl.
(cxx_print_error_function): Add third argument.
java/
* lang.c (java_print_error_function): Add third argument.
testsuite/
* lib/prune.exp: Prune also "^In function .*$" lines and
"^ inlined from .*$" lines.
From-SVN: r128830
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
* pretty-print.h (pp_widest_integer): New macro.
* tree-pretty-print.c (dump_bb_header): Print BB frequencies and
counts.
From-SVN: r102608
|
|
gcc:
* pretty-print.h (PP_NL_ARGMAX): New.
(text_info): Add locus.
(struct chunk_info): New.
(output_buffer): Add formatted_obstack, chunk_obstack, and
cur_chunk_array. Change obstack to a pointer.
(pp_wrapping_mode_t, pp_wrapping_mode, pp_set_verbatim_wrapping): New.
(struct pretty_print_info): Replace ideal_maximum_length and
prefixing_rule with wrapping.
(pp_line_cutoff, pp_prefixing_rule): Update to match.
Update prototypes and wrapper macros throughout.
* pretty-print.c (pp_formatted_text_data, pp_append_r)
(pp_base_clear_output_area, pp_construct, pp_base_formatted_text)
(pp_base_last_position_in_text, pp_base_newline, pp_base_character):
Update for changes to pp structure.
(pp_base_prepare_to_format, pp_base_format_text): Delete.
(pp_base_format, pp_base_output_formatted_text): New functions.
(pp_base_format_verbatim): Use pp_set_verbatim_wrapping.
(pp_verbatim): Clear text.locus.
(pp_printf): Likewise. Use pp_format and pp_output_formatted_text.
* c-objc-common.c (c_tree_printer): Update function signature.
* diagnostic.c (diagnostic_initialize): Update for changes to
pp structure.
(diagnostic_report_diagnostic): Call pp_format and then
pp_output_formatted_text.
(verbatim): Clear text.locus.
* diagnostic.h (diagnostic_prefixing_rule, diagnostic_line_cutoff):
Update for changes to pp structure.
* c-lang.c: No need to include c-pretty-print.h.
* Makefile.in: Remove bogus line containing only a tab.
(c-lang.o): Update dependencies.
* toplev.c (announce_function): Don't use verbatim.
(default_tree_printer): Update signature.
* objc/objc-lang.c: No need to include c-pretty-print.h.
* objc/Make-lang.in: Update dependencies.
gcc/cp:
* cp-lang.c: No need to include cxx-pretty-print.h.
* error.c (cp_printer): Update signature. No need to process
flags.
(print_instantiation_partial_context): Output last newline
with pp_base_newline.
* Make-lang.in: Update dependencies.
gcc/objcp:
* objcp-lang.c: No need to include cxx-pretty-print.h.
* Make-lang.in: Update dependencies.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r101481
|
|
From-SVN: r101317
|
|
* diagnostic.h (verbatim): Move ...
* toplev.h (verbatim): ... here. Add ATTRIBUTE_GCC_DIAG.
* pretty-print.h (pp_verbatim): Add ATTRIBUTE_GCC_PPDIAG.
From-SVN: r101157
|
|
appropriate.
* builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h,
c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c,
gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c,
tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/c4x/c4x.c, config/darwin.c,
config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c,
config/iq2000/iq2000.c, config/m32r/m32r.c,
config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h,
config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c,
config/ns32k/ns32k.c, config/rs6000/host-darwin.c,
config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
config/sh/symbian.c, config/stormy16/stormy16.c,
config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %<
and %> as appropriate. Use %' as apostrophe in diagnostics where
applicable. Use %< and %> in place of '' quotes where applicable.
Use %qs in place of %<%s%>. Consistently quote __builtin function
names.
ada:
* misc.c (gnat_handle_option): Use %< and %> for quoting in
warning message.
cp:
* call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
quoting in diagnostics.
* parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
quoting in printf format.
* decl.c (duplicate_decls, start_decl): Use %qD instead of
unquoted %D.
objc:
* objc-act.c: Use %q, %< and %> for quoting in diagnostics.
testsuite:
* gcc.dg/builtin-prefetch-1.c: Adjust expected messages.
From-SVN: r90337
|
|
* pretty-print.c: Include tree.h.
(pp_base_prepare_to_format): New function, logic from
text_specifies_location.
(pp_base_format_text): Use gcc_assert.
* pretty-print.h (pp_prepare_to_format): New macro.
(pp_base_prepare_to_format): Prototype.
* diagnostic.c (text_specifies_location): Delete.
(bug_report_request): Delete.
(diagnostic_set_info): Don't call text_specifies_location.
(diagnostic_action_after_output): Put text from
bug_report_request inline here. Use gcc_unreachable.
(diagnostic_report_current_function): Fix comment.
(diagnostic_report_diagnostic): Clarify logic for error recursion.
Call pp_prepare_to_format before diagnostic_starter.
(trim_filename): Use IS_DIR_SEPARATOR.
(fatal_error, internal_error): Use gcc_unreachable.
(error_recursion): Call diagnostic_action_after_output to
issue the bug_report_request message and exit.
* Makefile.in (diagnostic.o, pretty-print.o): Update dependencies.
* c-parse.in: Add list of diagnostic messages to insulate
translation template from version of yacc/bison used to
compile the grammar.
java:
* parse.y, parse-scan.y: Add list of diagnostic messages to
insulate translation template from version of yacc/bison used
to compile the grammar.
treelang:
* parse.y: Add list of diagnostic messages to insulate
translation template from version of yacc/bison used to
compile the grammar.
po:
* gcc.pot: Regenerate.
From-SVN: r88590
|
|
pretty-print.c.
gcc:
* attribs.c, builtins.c, c-format.c, c-pch.c, coverage.c,
except.c, fold-const.c, function.c, langhooks.c, params.c,
reload.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-mudflap.c, tree.c, varasm.c: Use %<, %> and %q
for quoting in diagnostics going through pretty-print.c. Use ''
for quoting in other diagnostic text.
* langhooks.c: Include intl.h. Mark text locating diagnostics for
translation.
* Makefile.in (langhooks.o): Update dependencies.
* pretty-print.h (pp_printf): Mark as accepting GCC diagnostic
formats.
gcc/testsuite:
* g++.dg/ext/member-attr.C, g++.dg/warn/deprecated.C,
gcc.dg/deprecated.c, gcc.dg/noreturn-1.c, gcc.dg/noreturn-4.c:
Update expected messages.
libmudflap:
* testsuite/libmudflap.c/pass35-frag.c: Update expected message.
From-SVN: r87563
|
|
From-SVN: r81764
|
|
gcc/
* dwarf2asm.c, loop.h, pretty-print.c, pretty-print.h,
config/i386/mmintrin.h: Update copyright.
cp/
* cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
Update copyright.
From-SVN: r79938
|
|
* pretty-print.c (pp_base_maybe_space): New function.
* pretty-print.h (pp_base_maybe_space): Declare.
(pp_maybe_space): New macro.
cp/
* error.c (enum pad): Remove.
(dump_qualifiers): Likewise.
(dump_type): Replace dump_qualifiers with
* pp_cxx_cv_qualifier_seq.
(dump_aggr_type): Likewise.
(dump_type_suffix): Likewise.
(dump_simple_decl): Likewise.
(dump_function_decl): Likewise.
(cv_to_string): Likewise.
(dump_type_prefix): Likewise. Adjust return void.
* cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
cxx_pretty_print.h.
(pp_cxx_template_keyword_if_needed): Document.
(pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
(pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
MUST_NOT_THROW_EXPR.
testsuite/
* g++.dg/template/qualttp20.C: Adjust dg- regexp.
From-SVN: r79796
|
|
* ChangeLog.7: Fix comment typos.
* c-common.c: Likewise.
* c-pretty-print.c: Likewise.
* cgraphunit.c: Likewise.
* et-forest.h: Likewise.
* expr.c: Likewise.
* gcse.c: Likewise.
* genautomata.c: Likewise.
* genrecog.c: Likewise.
* gensupport.c: Likewise.
* ggc-zone.c: Likewise.
* haifa-sched.c: Likewise.
* ifcvt.c: Likewise.
* loop.c: Likewise.
* optabs.c: Likewise.
* pretty-print.h: Likewise.
* regrename.c: Likewise.
* rtl.h: Likewise.
* sched-rgn.c: Likewise.
* target.h: Likewise.
* value-prof.c: Likewise.
* web.c: Likewise.
From-SVN: r73795
|
|
* pretty-print.h (pp_maybe_newline_and_indent): New macro.
* c-pretty-print.h (c_pretty_printer): Now typedef to the
structure. Be consistent with pretty-print.h abd cxx-pretty-print.h
(struct c_pretty_print_info): Document. Add new fields.
(pp_type_specifier_seq): Rename from pp_c_type_specifier.
(pp_direct_abstract_declarator): New macro.
(pp_ptr_operator): Likewise.
(pp_simple_type_specifier): Likewise.
(pp_expression): Likewise.
(pp_parameter_list): Rename from pp_parameter_declaration.
* c-pretty-print.c (pp_c_whitespace): Now a function.
(pp_c_left_paren): Likewise.
(pp_c_right_paren): Likewise.
(pp_c_dot): Likewise.
(pp_c_ampersand): Likewise.
(pp_c_arrow): Likewise.
(pp_c_semicolon): Likewise.
(pp_c_type_cast): New function.
(pp_c_space_for_pointer_operator): Likewise.
(pp_c_call_argument_list): Likewise.
(pp_c_cv_qualifier): Adjust prototype.
(pp_c_type_qualifier_list): Likewise.
(pp_c_pointer): Likewise. Handle REFERENCE_TYPE here.
(pp_c_type_specifier): Rename from pp_c_simple_type_specifier.
Adjust to follow standard grammar.
(pp_c_specifier_qualifier_list): Adjusr prototype. Handle
REFERENCE_TYPE. Tidy.
(pp_c_parameter_type_list): Adjust prototype. Tidy.
(pp_c_parameter_declaration): Remove.
(pp_c_abstract_declarator): Adjust prototype.
(pp_c_direct_abstract_declarator): Likewise.
(pp_c_type_id): Likewise.
(pp_c_storage_class_specifier): Likewise.
(pp_c_function_specifier): Likewise.
(pp_c_declaration_specifiers): Likewise.
(pp_c_direct_declarator): Likewise.
(pp_c_declarator): Likewise.
(pp_c_declarator): Likewise.
(pp_c_declaration): Likewise.
(pp_c_attributes): Likewise. Tidy.
(pp_c_function_definition): Adjust prototype.
(pp_c_char): Likewise.
(pp_c_string_literal): Likewise.
(pp_c_integer_constant): Likewise.
(pp_c_character_constant): Likewise.
(pp_c_bool_constant): Likewise.
(pp_c_enumeration_constant): Likewise.
(pp_c_floating_constant): Likewise.
(pp_c_constant): Likewise.
(pp_c_identifier): Likewise.
(pp_c_primary_expression): Likewise. Remove TARGET_EXPR case. Tidy.
(pp_c_initializer): Adjust prototype.
(pp_c_init_declarator): Likewise.
(pp_c_initializer_list): Likewise.
(pp_c_id_expression): Likewise.
(pp_c_postfix_expression): Likewise.
(pp_c_expression_list): Likewise.
(pp_c_unary_expression): Likewise.
(pp_c_cast_expression): Likewise.
(pp_c_multiplicative_expression): Likewise.
(pp_c_additive_expression): Likewise.
(pp_c_shift_expression): Likewise.
(pp_c_relational_expression): Likewise.
(pp_c_equality_expression): Likewise.
(pp_c_and_expression): Likewise.
(pp_c_exclusive_or_expression): Likewise.
(pp_c_inclusive_or_expression): Likewise.
(pp_c_logical_and_expression): Likewise.
(pp_c_logical_or_expression): Likewise.
(pp_c_conditional_expression): Likewise.
(pp_c_assignment_expression): Likewise.
(pp_c_expression): Likewise. Tidy.
(pp_c_statement): Likewise. Document.
(pp_c_pretty_printer_init): Adjust prototype. Tidy.
* c-lang.c (c_initialize_diagnostics): Update.
* c-common.h (strip_pointer_operator): Declare.
* c-common.c (strip_pointer_operator): Define.
cp/
* cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
(cxx_pretty_printer): Adjust base type.
(pp_cxx_function_specifier): Declare.
* cxx-pretty-print.c (pp_cxx_whitespace): New macro.
(pp_cxx_left_paren): Likewise.
(pp_cxx_right_paren): Likewise.
(pp_cxx_dot): Likewise.
(pp_cxx_arrow): Likewise.
(pp_cxx_semicolon): Likewise.
(pp_cxx_identifier): Likewise.
(pp_cxx_cv_qualifier_seq): Likewise.
(pp_cxx_storage_class_specifier): Likewise.
(pp_cxx_expression_list): Likewise.
(pp_cxx_space_for_pointer_operator): Likewise.
(pp_cxx_init_declarator): Likewise.
(pp_cxx_call_argument_list): Likewise.
(pp_cxx_nonconsecutive_character): Tidy.
(pp_cxx_conversion_function_id): New function.
(pp_cxx_template_id): Likewise.
(pp_cxx_class_name): Likewise.
(pp_cxx_template_keyword_if_needed): Likewise.
(pp_cxx_nested_name_specifier): Likewise.
(pp_cxx_unqualified_id): Tidy
(pp_cxx_qualified_id): Handle more nodes.
(pp_cxx_primary_expression): Tidy.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_new_expression): Tidy.
(pp_cxx_delete_expression): Likewise.
(pp_cxx_cast_expression): New function.
(pp_cxx_pm_expression): Tidy.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_operator): New function.
(pp_cxx_assignment_expression): Tidy.
(pp_cxx_expression): New function.
(pp_cxx_function_specifier): Likewise.
(pp_cxx_decl_specifier_seq): Likewise.
(pp_cxx_simple_type_specifier): Tidy.
(pp_cxx_type_specifier_seq): Likewise.
(pp_cxx_ptr_operator): New function.
(pp_cxx_implicit_parameter_type): Likewise.
(pp_cxx_parameter_declaration): Tidy.
(pp_cxx_parameter_declaration_clause): New function.
(pp_cxx_exception_specification): Likewise.
(pp_cxx_direct_declarator): Tidy.
(pp_cxx_declarator): Likewise.
(pp_cxx_ctor_initializer): New function.
(pp_cxx_function_definition): Likewise.
(pp_cxx_abstract_declarator): Tidy.
(pp_cxx_direct_abstract_declarator): Likewise.
(pp_cxx_type_id): Likewise.
(pp_cxx_exception_declaration): New function.
(pp_cxx_statement): Likewise.
(pp_cxx_simple_declaration): Likewise.
(pp_cxx_template_parameter_list): Likewise.
(pp_cxx_template_parameter): Likewise.
(pp_cxx_template_declaration): Likewise.
(pp_cxx_explicit_specialization): Likewise.
(pp_cxx_explicit_instantiation): Likewise.
(pp_cxx_declaration): Tidy.
(pp_cxx_pretty_printer_init): Initialize more fields.
From-SVN: r70777
|
|
* pretty-print.c (pp_base_indent): Rename from pp_indent.
* c-pretty-print.h (pp_c_pretty_print_flag)s: New datatype.
(struct c_pretty_print_info): Add more fields.
(pp_c_left_paren): Move to c-pretty-print.c.
(pp_c_right_paren): Likewise.
(pp_c_left_brace): Likewise.
(pp_c_right_brace): Likewise.
(pp_c_left_bracket): Likewise.
(pp_c_right_bracket): Likewise.
(pp_c_declarator): Declare.
(pp_c_direct_declarator): Likewise.
(pp_c_specifier_qualifier_list): Likewise.
(pp_c_type_id): Likewise.
* c-pretty-print.c (pp_c_cv_qualifier): Change prootype. Rework..
(pp_c_type_qualifier_list): New.
(pp_c_pointer): Likewise.
(pp_c_parameter_type_list): Likewise.
(pp_c_function_definition): Likewise.
(pp_c_id_expression): Likewise.
(pp_c_simple_type_specifier): Tidy.
(pp_c_unary_expression): Likewise.
(pp_c_expression): Likewise.
(pp_c_pretty_printer_init): Likewise.
(pp_c_specifier_qualifier_list): Rework..
(pp_c_abstract_declarator): Likewise.
(pp_c_postfix_expression): Likewise.
(pp_c_primary_expression): Likewise.
(pp_c_cast_expression): Likewise.
(pp_c_direct_abstract_declarator): Likewise.
(pp_c_storage_class_specifier): Likewise.
(pp_c_function_specifier): Likewise.
(pp_c_declaration_specifiers): Likewise.
(pp_c_direct_declarator): Likewise.
(pp_c_declarator): Likewise.
(pp_c_declaration): Likewise.
(pp_c_statement): Likewise.
(pp_c_integer_constant): Rename from pp_c_integer_literal.
(pp_c_character_constant): Rename from pp_c_character_literal.
(pp_c_bool_constant): Rename from pp_c_bool_literal.
(pp_c_enumeration_constant): Rename from pp_c_enumerator.
(pp_c_floating_constant): Rename from pp_c_real_literal.
(pp_c_constant): Rename from pp_c_literal.
* c-lang.c: Include diagnostic.h and c-pretty-print.h
(LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
(c_initialize_diagnostics): New.
* Makefile.in (c-lang.o): Update dependency.
cp/
* error.c (dump_expr): Tidy.
* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
(pp_cxx_begin_template_argument_list): Likewise.
(pp_cxx_end_template_argument_list): Likewise.
(is_destructor_name): Likewise.
(pp_cxx_unqualified_id): Likewise.
(pp_cxx_qualified_id): Likewise.
(pp_cxx_id_expression): Likewise.
(pp_cxx_new_expression): Likewise.
(pp_cxx_delete_expression): Likewise.
(pp_cxx_pm_expression): Likewise.
(pp_cxx_type_specifier): Rework.
(pp_cxx_type_id): Likewise.
(pp_cxx_primary_expression): Likewise.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_unary_expression): Likewise.
(pp_cxx_multiplicative_expression): Likewise.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_expression): Likewise.
(pp_cxx_pretty_printer_init): Tidy.
From-SVN: r70299
|