/* unary-expression: postfix-expression ++ cast-expression -- cast-expression unary-operator cast-expression sizeof unary-expression sizeof ( type-id ) new-expression delete-expression unary-operator: one of * & + - ! GNU extensions: __alignof__ unary-expression __alignof__ ( type-id ) */ static void pp_cxx_unary_expression (cxx_pretty_printer *pp, tree t) { enum tree_code code = TREE_CODE (t); switch (code) { case NEW_EXPR: case VEC_NEW_EXPR: pp_cxx_new_expression (pp, t); break; case DELETE_EXPR: case VEC_DELETE_EXPR: pp_cxx_delete_expression (pp, t); break; default: pp_c_unary_expression (pp_c_base (pp), t); break; } }
static void pp_cxx_unary_expression (cxx_pretty_printer *pp, tree t) { enum tree_code code = TREE_CODE (t); switch (code) { case NEW_EXPR: case VEC_NEW_EXPR: pp_cxx_new_expression (pp, t); break; case DELETE_EXPR: case VEC_DELETE_EXPR: pp_cxx_delete_expression (pp, t); break; case SIZEOF_EXPR: case ALIGNOF_EXPR: pp_cxx_identifier (pp, code == SIZEOF_EXPR ? "sizeof" : "__alignof__"); pp_cxx_whitespace (pp); if (TYPE_P (TREE_OPERAND (t, 0))) { pp_cxx_left_paren (pp); pp_cxx_type_id (pp, TREE_OPERAND (t, 0)); pp_cxx_right_paren (pp); } else pp_unary_expression (pp, TREE_OPERAND (t, 0)); break; case UNARY_PLUS_EXPR: pp_plus (pp); pp_cxx_cast_expression (pp, TREE_OPERAND (t, 0)); break; default: pp_c_unary_expression (pp_c_base (pp), t); break; } }