diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2003-07-25 09:52:32 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2003-07-25 09:52:32 +0000 |
commit | b6fe0bb8c5a68ed64a124734c3fdc39777f8f7e6 (patch) | |
tree | 0cd9e2817d3c1f65316bb57b92b7f8d6cd0f1864 /gcc/c-pretty-print.c | |
parent | d5ff4e3f11063acc36318f0c7a6dd9643679c92f (diff) | |
download | gcc-b6fe0bb8c5a68ed64a124734c3fdc39777f8f7e6.zip gcc-b6fe0bb8c5a68ed64a124734c3fdc39777f8f7e6.tar.gz gcc-b6fe0bb8c5a68ed64a124734c3fdc39777f8f7e6.tar.bz2 |
Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC.
Remove pedwarn_with_decl, warning_with_decl and error_with_decl
from GCC.
* calls.c (try_to_integrate): Don't use xxx_with_decl.
(expand_call): Likewise.
* dwarfout.c (output_reg_number): Likewise.
* expr.c (expand_expr): Likewise.
* function.c (assign_temp): Likewise.
(uninitialized_vars_warning): Likewise.
(setjmp_args_warning): Likewise.
(expand_function_end): Likewise.
* stmt.c (fixup_gotos): Likewise.
(warn_about_unused_variables): Likewise.
(expand_end_bindings): Likewise.
* stor-layout.c (layout_decl): Likewise.
(place_field): Likewise.
* toplev.c (check_global_declarations): Likewise.
(rest_of_handle_inlining): Likewise.
(default_tree_printer): New function.
(general_init): Initialize diagnostic machinery before routing
signals to the ICE machinery. Set default tree printer.
* toplev.h (pedwarn_with_decl): Remove declaration.
(warning_with_decl): Likewise.
(error_with_decl): Likewise.
(pedwarn): Remove attribute for the time being.
* tree-inline.c (expand_call_inline): Don't use xxx_with_decl.
* varasm.c (named_section): Likewise.
(make_decl_rtl): Likewise.
(assemble_variable): Likewise.
(merge_weak): Likewise.
(declare_weak): Likewise.
* diagnostic.h: Move non-diagnostic stuff into pretty-print.h.
* diagnostic.c: Move non-diagnostic stuff into pretty-print.c.
(format_with_decl): Remove.
(diagnostic_for_decl): Likewise.
(pedwarn_with_decl): Likewise.
(warning_with_decl): Likewise.
(error_with_decl): Likewise.
(diagnostic_initialize): Adjust.
(diagnostic_count_diagnostic): Likewise.
(announce_function): Likewise.
(lhd_print_error_function): Likewise.
(diagnostic_report_current_module): Likewise.
(default_diagnostic_starter): Likewise.
(diagnostic_report_diagnostic): Likewise.
(default_diagnostic_finalizer): Likewise.
(verbatim): Likewise.
(error): Likewise.
(warning): Likewise.
* opts.c (common_handle_option): Likewise.
* pretty-print.c: New file.
* c-pretty-print.h (pp_base): Override.
* c-pretty-print.c: Adjust use of macros throughout.
(pp_buffer): New macro.
(pp_newline): Likewise.
* c-objc-common.c (c_tree_printer): Adjust prototype. Tidy.
* Makefile.in (DIAGNOSTIC_H): New variable.
(c-errors.o): Use it.
(c-objc-common.o): Likewise.
(c-common.o): Likewise.
(c-opts.o): Likewise.
(c-format.o): Likewise.
(diagnostic.o): Likewise.
(opts.o): Likewise.
(toplev.o): Likewise.
(rtl-error.o): Likewise.
(dwarf2out.o): Likewise.
(jump.o): Likewise.
(pretty-print.o): New rule.
cp/
* Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
* error.c: Use the new pretty-printer fraamework.
From-SVN: r69773
Diffstat (limited to 'gcc/c-pretty-print.c')
-rw-r--r-- | gcc/c-pretty-print.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c index 63b18b3..7bb4cb0 100644 --- a/gcc/c-pretty-print.c +++ b/gcc/c-pretty-print.c @@ -74,6 +74,9 @@ static void pp_c_type_id (c_pretty_printer, tree); static void pp_c_storage_class_specifier (c_pretty_printer, tree); static void pp_c_function_specifier (c_pretty_printer, tree); +#define pp_buffer(PP) pp_base (PP)->buffer +#define pp_newline(PP) (pp_newline) (pp_base (PP)) + /* Declarations. */ @@ -248,9 +251,9 @@ pp_c_init_declarator (c_pretty_printer pp, tree t) pp_declarator (pp, t); if (DECL_INITIAL (t)) { - pp_whitespace (pp); + pp_space (pp); pp_equal (pp); - pp_whitespace (pp); + pp_space (pp); pp_c_initializer (pp, DECL_INITIAL (t)); } } @@ -336,9 +339,9 @@ pp_c_char (c_pretty_printer ppi, int c) break; default: if (ISPRINT (c)) - pp_character (ppi, c); + pp_character (&ppi->base, c); else - pp_format_scalar (ppi, "\\%03o", (unsigned) c); + pp_scalar (ppi, "\\%03o", (unsigned) c); break; } } @@ -1038,7 +1041,7 @@ pp_c_assignment_expression (c_pretty_printer ppi, tree e) pp_c_unary_expression (ppi, TREE_OPERAND (e, 0)); pp_c_maybe_whitespace (ppi); pp_equal (ppi); - pp_whitespace (ppi); + pp_space (ppi); pp_c_assignment_expression (ppi, TREE_OPERAND (e, 1)); } else @@ -1234,7 +1237,7 @@ pp_c_statement (c_pretty_printer ppi, tree stmt) case IF_STMT: pp_c_identifier (ppi, "if"); - pp_whitespace (ppi); + pp_space (ppi); pp_c_left_paren (ppi); pp_c_expression (ppi, IF_COND (stmt)); pp_right_paren (ppi); @@ -1258,7 +1261,7 @@ pp_c_statement (c_pretty_printer ppi, tree stmt) case SWITCH_STMT: pp_newline (ppi); pp_c_identifier (ppi, "switch"); - pp_whitespace (ppi); + pp_space (ppi); pp_c_left_paren (ppi); pp_c_expression (ppi, SWITCH_COND (stmt)); pp_right_paren (ppi); @@ -1269,7 +1272,7 @@ pp_c_statement (c_pretty_printer ppi, tree stmt) case WHILE_STMT: pp_c_identifier (ppi, "while"); - pp_whitespace (ppi); + pp_space (ppi); pp_c_left_paren (ppi); pp_c_expression (ppi, WHILE_COND (stmt)); pp_right_paren (ppi); @@ -1284,7 +1287,7 @@ pp_c_statement (c_pretty_printer ppi, tree stmt) pp_statement (ppi, DO_BODY (stmt)); pp_newline_and_indent (ppi, -3); pp_c_identifier (ppi, "while"); - pp_whitespace (ppi); + pp_space (ppi); pp_c_left_paren (ppi); pp_c_expression (ppi, DO_COND (stmt)); pp_c_right_paren (ppi); @@ -1294,7 +1297,7 @@ pp_c_statement (c_pretty_printer ppi, tree stmt) case FOR_STMT: pp_c_identifier (ppi, "for"); - pp_whitespace (ppi); + pp_space (ppi); pp_c_left_paren (ppi); pp_statement (ppi, FOR_INIT_STMT (stmt)); pp_c_whitespace (ppi); @@ -1364,20 +1367,20 @@ pp_c_statement (c_pretty_printer ppi, tree stmt) pp_c_identifier (ppi, is_extended ? "__asm__" : "asm"); if (has_volatile_p) pp_c_identifier (ppi, "__volatile__"); - pp_whitespace (ppi); + pp_space (ppi); pp_c_left_paren (ppi); pp_c_string_literal (ppi, ASM_STRING (stmt)); if (is_extended) { - pp_whitespace (ppi); + pp_space (ppi); pp_separate_with (ppi, ':'); if (ASM_OUTPUTS (stmt)) pp_c_expression (ppi, ASM_OUTPUTS (stmt)); - pp_whitespace (ppi); + pp_space (ppi); pp_separate_with (ppi, ':'); if (ASM_INPUTS (stmt)) pp_c_expression (ppi, ASM_INPUTS (stmt)); - pp_whitespace (ppi); + pp_space (ppi); pp_separate_with (ppi, ':'); if (ASM_CLOBBERS (stmt)) pp_c_expression (ppi, ASM_CLOBBERS (stmt)); @@ -1389,7 +1392,7 @@ pp_c_statement (c_pretty_printer ppi, tree stmt) case FILE_STMT: pp_c_identifier (ppi, "__FILE__"); - pp_whitespace (ppi); + pp_space (ppi); pp_equal (ppi); pp_c_whitespace (ppi); pp_c_identifier (ppi, FILE_STMT_FILENAME (stmt)); |