This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Fix PR c++/22452


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]