diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2003-08-10 18:17:06 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2003-08-10 18:17:06 +0000 |
commit | 4b780675e462fe50a27c972672a171927d37564d (patch) | |
tree | 6b4733cd709d9969e774e038f5d1924ffe164466 /gcc/cp/error.c | |
parent | bae39a73bedabd843cbd6adfe195fa2327ca89ea (diff) | |
download | gcc-4b780675e462fe50a27c972672a171927d37564d.zip gcc-4b780675e462fe50a27c972672a171927d37564d.tar.gz gcc-4b780675e462fe50a27c972672a171927d37564d.tar.bz2 |
pretty-print.c (pp_base_indent): Rename from pp_indent.
* 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
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index cd44f15..380a526 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1331,38 +1331,9 @@ dump_expr (tree t, int flags) break; case INTEGER_CST: - { - tree type = TREE_TYPE (t); - my_friendly_assert (type != 0, 81); - - /* If it's an enum, output its tag, rather than its value. */ - if (TREE_CODE (type) == ENUMERAL_TYPE) - { - tree values = TYPE_VALUES (type); - - for (; values; - values = TREE_CHAIN (values)) - if (tree_int_cst_equal (TREE_VALUE (values), t)) - break; - - if (values) - pp_tree_identifier (cxx_pp, TREE_PURPOSE (values)); - else - { - /* Value must have been cast. */ - pp_left_paren (cxx_pp); - dump_type (type, flags); - pp_right_paren (cxx_pp); - pp_c_integer_literal (pp_c_base (cxx_pp), t); - } - } - else - pp_c_integer_literal (pp_c_base (cxx_pp), t); - } - break; - + case STRING_CST: case REAL_CST: - pp_c_real_literal (pp_c_base (cxx_pp), t); + pp_c_constant (pp_c_base (cxx_pp), t); break; case PTRMEM_CST: @@ -1372,10 +1343,6 @@ dump_expr (tree t, int flags) pp_tree_identifier (cxx_pp, DECL_NAME (PTRMEM_CST_MEMBER (t))); break; - case STRING_CST: - pp_c_string_literal (pp_c_base (cxx_pp), t); - break; - case COMPOUND_EXPR: pp_left_paren (cxx_pp); dump_expr (TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS); |