This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix PR c++/22452
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