diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-31 15:10:41 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-31 15:10:41 +0000 |
commit | 3ac2178bf186494a360c88c130427486a4803551 (patch) | |
tree | 3d604b4184e9611d9c196a1136cc32ae6be34e40 /gcc/cp/semantics.c | |
parent | c2c0951d11865d2343fabdadafcd61615d8f84f5 (diff) |
PR c++/79264
* lambda.c (maybe_generic_this_capture): Deal with
template-id-exprs.
* semantics.c (finish_member_declaration): Assert class is being
defined.
PR c++/79264
* g++.dg/cpp1y/pr61636-1.C: Augment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index bd91e1832f7..e4f2a6a8807 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2962,6 +2962,12 @@ finish_member_declaration (tree decl) /* We should see only one DECL at a time. */ gcc_assert (DECL_CHAIN (decl) == NULL_TREE); + /* Don't add decls after definition. */ + gcc_assert (TYPE_BEING_DEFINED (current_class_type) + /* We can add lambda types when late parsing default + arguments. */ + || LAMBDA_TYPE_P (TREE_TYPE (decl))); + /* Set up access control for DECL. */ TREE_PRIVATE (decl) = (current_access_specifier == access_private_node); |