aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-03-16 22:38:50 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-03-16 22:38:50 -0400
commitc73356802f430fd51f0d4db1ec928fb093c7c4a6 (patch)
tree327525948c4a7e69b6203fbe7bbe1911d384e157 /gcc/cp/tree.c
parent8e519a8b0a3543210d7103042cc0a2e1b3603832 (diff)
downloadgcc-c73356802f430fd51f0d4db1ec928fb093c7c4a6.zip
gcc-c73356802f430fd51f0d4db1ec928fb093c7c4a6.tar.gz
gcc-c73356802f430fd51f0d4db1ec928fb093c7c4a6.tar.bz2
re PR c++/54764 (In class initialization of non-static lambda member can't be used in class with default template paramer)
PR c++/54764 PR c++/55972 * name-lookup.h (tag_scope): Add ts_lambda. * semantics.c (begin_lambda_type): Use it. * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR. * pt.c (check_default_tmpl_args): Ignore lambdas. (push_template_decl_real): Handle lambdas. * tree.c (no_linkage_check): Adjust lambda check. From-SVN: r196742
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 42ba677..a1cce64 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2028,11 +2028,12 @@ no_linkage_check (tree t, bool relaxed_p)
if (TYPE_PTRMEMFUNC_P (t))
goto ptrmem;
/* Lambda types that don't have mangling scope have no linkage. We
- check CLASSTYPE_LAMBDA_EXPR here rather than LAMBDA_TYPE_P because
+ check CLASSTYPE_LAMBDA_EXPR for error_mark_node because
when we get here from pushtag none of the lambda information is
set up yet, so we want to assume that the lambda has linkage and
fix it up later if not. */
if (CLASSTYPE_LAMBDA_EXPR (t)
+ && CLASSTYPE_LAMBDA_EXPR (t) != error_mark_node
&& LAMBDA_TYPE_EXTRA_SCOPE (t) == NULL_TREE)
return t;
/* Fall through. */