This is the mail archive of the
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: <email@example.com> <42D7A350.firstname.lastname@example.org>
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?
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 Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
email@example.com :: http://www.planetfall.pwp.blueyonder.co.uk