[PATCH]: Fix PR c++/22452

Daniel Berlin dberlin@dberlin.org
Fri Jul 15 19:40:00 GMT 2005


On Fri, 2005-07-15 at 12:54 +0100, Nathan Sidwell wrote:
> Nathan Sidwell wrote:
> > Daniel Berlin wrote:
> > 
> >> This restores the behavior of decl_linkage to what it was before the
> >> decl restructuring patch went in, by not checking DECL_COMDAT on
> >> CONST_DECL (since CONST_DECL's can't be DECL_COMDAT).
> >>
> 
> >> Gaby seems to believe the behavior of decl_linkage is wrong in some way
> >> in regard to CONST_DECL.
> > 
> > 
> >> Okay for mainline?
> > 
> > ok
> actually, looking at the code, I think you just need
>    if (TREE_CODE (decl) == CONST_DECL)
>      return decl_linkage (TYPE_NAME (TREE_TYPE (decl)));
> 
> before the comdat check.  Can you give that a try?
> 

That works too.

Can i commit that patch with the obvious changelog?

> nathan



More information about the Gcc-patches mailing list