aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index d1192b7..1d311b0 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2780,9 +2780,10 @@ verify_stmt_tree (tree t)
cp_walk_tree (&t, verify_stmt_tree_r, &statements, NULL);
}
-/* Check if the type T depends on a type with no linkage and if so, return
- it. If RELAXED_P then do not consider a class type declared within
- a vague-linkage function to have no linkage. */
+/* Check if the type T depends on a type with no linkage and if so,
+ return it. If RELAXED_P then do not consider a class type declared
+ within a vague-linkage function to have no linkage. Remember:
+ no-linkage is not the same as internal-linkage*/
tree
no_linkage_check (tree t, bool relaxed_p)
@@ -2801,17 +2802,6 @@ no_linkage_check (tree t, bool relaxed_p)
tree extra = LAMBDA_TYPE_EXTRA_SCOPE (t);
if (!extra)
return t;
-
- /* If the mangling scope is internal-linkage or not repeatable
- elsewhere, the lambda effectively has no linkage. (Sadly
- we're not very careful with the linkages of types.) */
- if (TREE_CODE (extra) == VAR_DECL
- && !(TREE_PUBLIC (extra)
- && (processing_template_decl
- || (DECL_LANG_SPECIFIC (extra) && DECL_USE_TEMPLATE (extra))
- /* DECL_COMDAT is set too late for us to check. */
- || DECL_VAR_DECLARED_INLINE_P (extra))))
- return t;
}
/* Otherwise there's no point in checking linkage on template functions; we