summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/cp/error.c')
-rw-r--r--contrib/gcc/cp/error.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/gcc/cp/error.c b/contrib/gcc/cp/error.c
index c169cab..92b042a 100644
--- a/contrib/gcc/cp/error.c
+++ b/contrib/gcc/cp/error.c
@@ -507,7 +507,15 @@ dump_type_prefix (tree t, int flags)
pp_cxx_whitespace (cxx_pp);
pp_cxx_left_paren (cxx_pp);
}
- pp_character (cxx_pp, "&*"[TREE_CODE (t) == POINTER_TYPE]);
+ if (TREE_CODE (t) == POINTER_TYPE)
+ pp_character(cxx_pp, '*');
+ else if (TREE_CODE (t) == REFERENCE_TYPE)
+ {
+ if (TYPE_REF_IS_RVALUE (t))
+ pp_string (cxx_pp, "&&");
+ else
+ pp_character (cxx_pp, '&');
+ }
pp_base (cxx_pp)->padding = pp_before;
pp_cxx_cv_qualifier_seq (cxx_pp, t);
}
OpenPOWER on IntegriCloud