This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lambda] minor cleanups
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Cc: John Freeman <jfreeman08 at gmail dot com>, Adam Butcher <adam at jessamine dot co dot uk>
- Date: Fri, 28 Aug 2009 12:11:21 -0400
- Subject: [lambda] minor cleanups
I'm checking in this patch with some minor cleanups; the lambda
testcases all still pass without the hacks to no_linkage_check now.
I think I'm going to poke at mangling now.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index ec1dfec..c49c6ae 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7209,8 +7209,6 @@ cp_parser_lambda_parameter_declaration_opt (cp_parser* parser,
/* Remove the function parms from scope. Must wait until after return
type clause in case of decltype. */
- /* TODO: Do we need to remove them from scope in between the parameter
- list and the return type clause? */
{
tree t;
for (t = current_binding_level->names; t; t = TREE_CHAIN (t))
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 210c0cd..1a406a3 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1521,10 +1521,7 @@ no_linkage_check (tree t, bool relaxed_p)
switch (TREE_CODE (t))
{
- /*
- TODO: fix no linkage check on lambda functions properly
tree fn;
- */
case RECORD_TYPE:
if (TYPE_PTRMEMFUNC_P (t))
@@ -1537,12 +1534,9 @@ no_linkage_check (tree t, bool relaxed_p)
case ENUMERAL_TYPE:
if (TYPE_ANONYMOUS_P (t))
return t;
- /*
- TODO: fix no linkage check on lambda functions properly
fn = decl_function_context (TYPE_MAIN_DECL (t));
if (fn && (!relaxed_p || !TREE_PUBLIC (fn)))
return t;
- */
return NULL_TREE;
case ARRAY_TYPE:
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C
index e9a48ff..92dee70 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C
@@ -1,4 +1,3 @@
-// { dg-do "run" }
// { dg-options "-std=c++0x" }
#include <cassert>