diff options
-rw-r--r-- | gcc/cp/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/cp/cxx-pretty-print.c | 7 | ||||
-rw-r--r-- | gcc/cp/cxx-pretty-print.h | 2 | ||||
-rw-r--r-- | gcc/cp/error.c | 22 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 |
5 files changed, 27 insertions, 22 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 484d15216b8..6ea272f33f7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,16 @@ +2007-10-31 Paolo Carlini <pcarlini@suse.de> + + PR c++/33494 + * cxx-pretty-print.c (pp_cxx_typeid_expression, + pp_cxx_delete_expression): Change to static linkage. + * cxx-pretty-print.h: Adjust declarations. + * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR, + MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR, + MODOP_EXPR): Forward to pp_expression. + + * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR): + Fix typo. + 2007-10-31 Christian Bruel <christian.bruel@st.com> Mark Mitchell <mark@codesourcery.com> diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index 1de5964dd73..9c5a85ff0b4 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -43,6 +43,7 @@ static void pp_cxx_abstract_declarator (cxx_pretty_printer *, tree); static void pp_cxx_statement (cxx_pretty_printer *, tree); static void pp_cxx_template_parameter (cxx_pretty_printer *, tree); static void pp_cxx_cast_expression (cxx_pretty_printer *, tree); +static void pp_cxx_typeid_expression (cxx_pretty_printer *, tree); static inline void @@ -672,7 +673,7 @@ pp_cxx_new_expression (cxx_pretty_printer *pp, tree t) ::(opt) delete cast-expression ::(opt) delete [ ] cast-expression */ -void +static void pp_cxx_delete_expression (cxx_pretty_printer *pp, tree t) { enum tree_code code = TREE_CODE (t); @@ -1064,7 +1065,7 @@ pp_cxx_expression (cxx_pretty_printer *pp, tree t) case NON_DEPENDENT_EXPR: case MUST_NOT_THROW_EXPR: - pp_cxx_expression (pp, t); + pp_cxx_expression (pp, TREE_OPERAND (t, 0)); break; case EXPR_PACK_EXPANSION: @@ -2161,7 +2162,7 @@ pp_cxx_declaration (cxx_pretty_printer *pp, tree t) } } -void +static void pp_cxx_typeid_expression (cxx_pretty_printer *pp, tree t) { t = TREE_OPERAND (t, 0); diff --git a/gcc/cp/cxx-pretty-print.h b/gcc/cp/cxx-pretty-print.h index 744ee5916bc..e7c4220614f 100644 --- a/gcc/cp/cxx-pretty-print.h +++ b/gcc/cp/cxx-pretty-print.h @@ -70,9 +70,7 @@ void pp_cxx_separate_with (cxx_pretty_printer *, int); void pp_cxx_declaration (cxx_pretty_printer *, tree); void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree); void pp_cxx_trait_expression (cxx_pretty_printer *, tree); -void pp_cxx_typeid_expression (cxx_pretty_printer *, tree); void pp_cxx_va_arg_expression (cxx_pretty_printer *, tree); void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree); -void pp_cxx_delete_expression (cxx_pretty_printer *, tree); #endif /* GCC_CXX_PRETTY_PRINT_H */ diff --git a/gcc/cp/error.c b/gcc/cp/error.c index b949f192a51..031a22129d7 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1873,10 +1873,6 @@ dump_expr (tree t, int flags) dump_decl (TEMPLATE_PARM_DECL (t), flags & ~TFF_DECL_SPECIFIERS); break; - case SCOPE_REF: - pp_expression (cxx_pp, t); - break; - case CAST_EXPR: if (TREE_OPERAND (t, 0) == NULL_TREE || TREE_CHAIN (TREE_OPERAND (t, 0))) @@ -2004,11 +2000,6 @@ dump_expr (tree t, int flags) dump_expr (TREE_OPERAND (t, 0), flags); break; - case EXPR_PACK_EXPANSION: - dump_expr (PACK_EXPANSION_PATTERN (t), flags); - pp_cxx_identifier (cxx_pp, "..."); - break; - case ARGUMENT_PACK_SELECT: dump_template_argument (ARGUMENT_PACK_SELECT_FROM_PACK (t), flags); break; @@ -2040,10 +2031,6 @@ dump_expr (tree t, int flags) pp_cxx_trait_expression (cxx_pp, t); break; - case TYPEID_EXPR: - pp_cxx_typeid_expression (cxx_pp, t); - break; - case VA_ARG_EXPR: pp_cxx_va_arg_expression (cxx_pp, t); break; @@ -2052,14 +2039,15 @@ dump_expr (tree t, int flags) pp_cxx_offsetof_expression (cxx_pp, t); break; + case SCOPE_REF: + case EXPR_PACK_EXPANSION: + case TYPEID_EXPR: case MEMBER_REF: case DOTSTAR_EXPR: - pp_multiplicative_expression (cxx_pp, t); - break; - case DELETE_EXPR: case VEC_DELETE_EXPR: - pp_cxx_delete_expression (cxx_pp, t); + case MODOP_EXPR: + pp_expression (cxx_pp, t); break; /* This list is incomplete, but should suffice for now. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2689335cc18..bd9eb7b1e7d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-10-31 Paolo Carlini <pcarlini@suse.de> + + PR c++/33494 + * g++.dg/template/error35.C: New. + 2007-10-31 Jakub Jelinek <jakub@redhat.com> PR target/31507 |