diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-18 08:25:12 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-18 08:25:12 +0000 |
commit | d7b8e04e33f7f3d5ddd023ca695ca2f4e0eb1a8a (patch) | |
tree | fdbd03638ca28d0078d1a7f42225d33c7a199b20 /gcc/cp/error.c | |
parent | 956ed13ee30b6f0a3e898c51f4e953e28f78df00 (diff) | |
download | gcc-d7b8e04e33f7f3d5ddd023ca695ca2f4e0eb1a8a.tar.gz |
* c-pretty-print.h (pp_type_specifier_seq): Fix thinko.
* c-pretty-print.c: Fix formatting.
(pp_c_integer_constant): Append type annotation to literals. Tidy.
(pp_c_type_specifier): Tidy.
(pp_c_compound_literal): New function.
(pp_c_initializer): Simplify..
(pp_c_initializer_list): Likewise.
(pp_c_brace_enclosed_initializer_list): New function.
(pp_c_postfix_expression): Simplify.
cp/
* error.c (dump_type): Simplify. Use pp_type_specifier_seq for
"C" types.
* cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71511 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 5c94d758716..a10dcf6a876 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -338,45 +338,14 @@ dump_type (tree t, int flags) dump_decl (t, flags & ~TFF_DECL_SPECIFIERS); break; - case COMPLEX_TYPE: - pp_string (cxx_pp, "__complex__ "); - dump_type (TREE_TYPE (t), flags); - break; - - case VECTOR_TYPE: - pp_string (cxx_pp, "__vector__ "); - { - /* The subtype of a VECTOR_TYPE is something like intQI_type_node, - which has no name and is not very useful for diagnostics. So - look up the equivalent C type and print its name. */ - tree elt = TREE_TYPE (t); - elt = c_common_type_for_mode (TYPE_MODE (elt), TREE_UNSIGNED (elt)); - dump_type (elt, flags); - } - break; - case INTEGER_TYPE: - if (!TREE_UNSIGNED (TYPE_MAIN_VARIANT (t)) && TREE_UNSIGNED (t)) - pp_string (cxx_pp, "unsigned "); - else if (TREE_UNSIGNED (TYPE_MAIN_VARIANT (t)) && !TREE_UNSIGNED (t)) - pp_string (cxx_pp, "signed "); - - /* fall through. */ case REAL_TYPE: case VOID_TYPE: case BOOLEAN_TYPE: - { - tree type; - dump_qualifiers (t, after); - type = flags & TFF_CHASE_TYPEDEF ? TYPE_MAIN_VARIANT (t) : t; - if (TYPE_NAME (type) && TYPE_IDENTIFIER (type)) - pp_tree_identifier (cxx_pp, TYPE_IDENTIFIER (type)); - else - /* Types like intQI_type_node and friends have no names. - These don't come up in user error messages, but it's nice - to be able to print them from the debugger. */ - pp_identifier (cxx_pp, "<anonymous>"); - } + case COMPLEX_TYPE: + case VECTOR_TYPE: + pp_base (cxx_pp)->padding = pp_none; + pp_type_specifier_seq (cxx_pp, t); break; case TEMPLATE_TEMPLATE_PARM: |