This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix PR c++/22452
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, Gabriel Dos Reis <gdr at integrable-solutions dot net>,GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 15 Jul 2005 12:54:35 +0100
- Subject: Re: [PATCH]: Fix PR c++/22452
- References: <1121380218.12483.54.camel@linux.site> <42D7A350.2030609@codesourcery.com>
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?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk