aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-04-30 16:48:12 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-04-30 16:48:12 -0400
commit5cb6410a270421888033a4489c9f46d979324877 (patch)
tree6c3ee1387a4d461316c59089e7b063a90fc06d63 /gcc/cp/cxx-pretty-print.c
parent8267740011a51a553aadedc6b949bddc40770ccc (diff)
downloadgcc-5cb6410a270421888033a4489c9f46d979324877.zip
gcc-5cb6410a270421888033a4489c9f46d979324877.tar.gz
gcc-5cb6410a270421888033a4489c9f46d979324877.tar.bz2
re PR c++/43868 (ICE with -g)
PR c++/43868 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling... (pp_cxx_type_specifier_seq): ...here. From-SVN: r158947
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r--gcc/cp/cxx-pretty-print.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 5ef84fe..7b92272 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -1170,16 +1170,6 @@ pp_cxx_decl_specifier_seq (cxx_pretty_printer *pp, tree t)
pp_cxx_decl_specifier_seq (pp, TREE_TYPE (t));
break;
- case RECORD_TYPE:
- if (TYPE_PTRMEMFUNC_P (t))
- {
- tree pfm = TYPE_PTRMEMFUNC_FN_TYPE (t);
- pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (pfm)));
- pp_cxx_whitespace (pp);
- pp_cxx_ptr_operator (pp, t);
- }
- break;
-
case FUNCTION_DECL:
/* Constructors don't have return types. And conversion functions
do not have a type-specifier in their return types. */
@@ -1275,6 +1265,17 @@ pp_cxx_type_specifier_seq (cxx_pretty_printer *pp, tree t)
pp_cxx_right_paren (pp);
break;
+ case RECORD_TYPE:
+ if (TYPE_PTRMEMFUNC_P (t))
+ {
+ tree pfm = TYPE_PTRMEMFUNC_FN_TYPE (t);
+ pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (pfm)));
+ pp_cxx_whitespace (pp);
+ pp_cxx_ptr_operator (pp, t);
+ break;
+ }
+ /* else fall through */
+
default:
if (!(TREE_CODE (t) == FUNCTION_DECL && DECL_CONSTRUCTOR_P (t)))
pp_c_specifier_qualifier_list (pp_c_base (pp), t);