Commit 3f774254 by Daniel Berlin Committed by Daniel Berlin

re PR c++/22452 (ICE expected tree that contains 'decl with visibility'…

re PR c++/22452 (ICE expected tree that contains 'decl with visibility' structure, have 'const_decl'  in decl_linkage, at cp/tree.c:2132)

2005-07-14  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR c++/22452
	* tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.

From-SVN: r102063
parent be9c593a
2005-07-14 Daniel Berlin <dberlin@dberlin.org>
Fix PR c++/22452
* tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
2005-07-15 Mark Mitchell <mark@codesourcery.com>
PR c++/22132
......
......@@ -2124,6 +2124,11 @@ decl_linkage (tree decl)
if (TREE_PUBLIC (decl))
return lk_external;
/* Linkage of a CONST_DECL depends on the linkage of the enumeration
type. */
if (TREE_CODE (decl) == CONST_DECL)
return decl_linkage (TYPE_NAME (TREE_TYPE (decl)));
/* Some things that are not TREE_PUBLIC have external linkage, too.
For example, on targets that don't have weak symbols, we make all
template instantiations have internal linkage (in the object
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment