diff options
author | Jason Merrill <jason@redhat.com> | 2010-06-08 00:33:50 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-06-08 00:33:50 -0400 |
commit | af88c58fb826aad723367d1b1ac09b6b64c87c68 (patch) | |
tree | e6912c19c9456eb1176fec5d588fde1d7951f52d /gcc/cp/error.c | |
parent | 49c8958b5848f2d779b3777c43d7ec02fc62c466 (diff) | |
download | gcc-af88c58fb826aad723367d1b1ac09b6b64c87c68.zip gcc-af88c58fb826aad723367d1b1ac09b6b64c87c68.tar.gz gcc-af88c58fb826aad723367d1b1ac09b6b64c87c68.tar.bz2 |
re PR c++/44366 ([C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.)
PR c++/44366
* error.c (dump_parameters): Mask out TFF_SCOPE.
(dump_simple_decl): Don't print the scope of a PARM_DECL.
(dump_scope): Remove no-op mask.
From-SVN: r160420
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index d535f05..7730e4b 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -115,7 +115,7 @@ init_error (void) static void dump_scope (tree scope, int flags) { - int f = ~TFF_RETURN_TYPE & (flags & (TFF_SCOPE | TFF_CHASE_TYPEDEF)); + int f = flags & (TFF_SCOPE | TFF_CHASE_TYPEDEF); if (scope == NULL_TREE) return; @@ -865,6 +865,7 @@ dump_simple_decl (tree t, tree type, int flags) pp_maybe_space (cxx_pp); } if (! (flags & TFF_UNQUALIFIED_NAME) + && TREE_CODE (t) != PARM_DECL && (!DECL_INITIAL (t) || TREE_CODE (DECL_INITIAL (t)) != TEMPLATE_PARM_INDEX)) dump_scope (CP_DECL_CONTEXT (t), flags); @@ -1355,6 +1356,7 @@ static void dump_parameters (tree parmtypes, int flags) { int first = 1; + flags &= ~TFF_SCOPE; pp_cxx_left_paren (cxx_pp); for (first = 1; parmtypes != void_list_node; |