aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/cp/name-lookup.c')
-rw-r--r--gcc-4.8/gcc/cp/name-lookup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/cp/name-lookup.c b/gcc-4.8/gcc/cp/name-lookup.c
index 2a47331ea..c121a4163 100644
--- a/gcc-4.8/gcc/cp/name-lookup.c
+++ b/gcc-4.8/gcc/cp/name-lookup.c
@@ -3015,8 +3015,10 @@ push_class_level_binding_1 (tree name, tree x)
if (name == error_mark_node)
return false;
- /* Check for invalid member names. */
- gcc_assert (TYPE_BEING_DEFINED (current_class_type));
+ /* Check for invalid member names. But don't worry about a default
+ argument-scope lambda being pushed after the class is complete. */
+ gcc_assert (TYPE_BEING_DEFINED (current_class_type)
+ || LAMBDA_TYPE_P (TREE_TYPE (decl)));
/* Check that we're pushing into the right binding level. */
gcc_assert (current_class_type == class_binding_level->this_entity);