diff options
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 3cfc869..0306db1 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -3579,8 +3579,7 @@ decl_linkage (tree decl) template instantiations have internal linkage (in the object file), but the symbols should still be treated as having external linkage from the point of view of the language. */ - if ((TREE_CODE (decl) == FUNCTION_DECL - || TREE_CODE (decl) == VAR_DECL) + if (VAR_OR_FUNCTION_DECL_P (decl) && DECL_COMDAT (decl)) return lk_external; @@ -3594,7 +3593,7 @@ decl_linkage (tree decl) really meant to have internal linkage have DECL_THIS_STATIC set. */ if (TREE_CODE (decl) == TYPE_DECL) return lk_external; - if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL) + if (VAR_OR_FUNCTION_DECL_P (decl)) { if (!DECL_THIS_STATIC (decl)) return lk_external; |