diff options
author | Jason Merrill <jason@redhat.com> | 2013-03-28 14:20:45 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2013-03-28 14:20:45 -0400 |
commit | fad882c6d9f520191ea301a023aa86e348049973 (patch) | |
tree | 8d4dd00befd820ba47095c74be1d3d12d3bddd02 /gcc/cp/semantics.c | |
parent | c561e95201474d7951cbd7a09195b7f3b412d1e9 (diff) | |
download | gcc-fad882c6d9f520191ea301a023aa86e348049973.zip gcc-fad882c6d9f520191ea301a023aa86e348049973.tar.gz gcc-fad882c6d9f520191ea301a023aa86e348049973.tar.bz2 |
re PR c++/56710 (Using reserved double underscore variable name in a lambda causes internal compiler error)
PR c++/56710
* semantics.c (finish_member_declaration): Don't push closure
members.
From-SVN: r197211
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 0b8e2f7..ad1c209 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2719,8 +2719,10 @@ finish_member_declaration (tree decl) /*friend_p=*/0); } } - /* Enter the DECL into the scope of the class. */ - else if (pushdecl_class_level (decl)) + /* Enter the DECL into the scope of the class, if the class + isn't a closure (whose fields are supposed to be unnamed). */ + else if (CLASSTYPE_LAMBDA_EXPR (current_class_type) + || pushdecl_class_level (decl)) { if (TREE_CODE (decl) == USING_DECL) { |