[PATCH]: Fix PR c++/22452

Daniel Berlin dberlin@dberlin.org
Thu Jul 14 22:30:00 GMT 2005


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).

If they were ever set to DECL_COMDAT, we'd get a tree check somewhere
else anyway.

Gaby seems to believe the behavior of decl_linkage is wrong in some way
in regard to CONST_DECL.

I have no real opinion on whether it is or not, i'll leave it to the C++
people to battle it own in a bloody cage match.  I'm simply posting a
patch to fix the regression i caused by making it behave how it used to.

Bootstrapped and regtested i686-pc-linux-gnu.

Okay for mainline?
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: declfix.diff
Type: text/x-patch
Size: 948 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050714/95fce998/attachment.bin>


More information about the Gcc-patches mailing list