This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR C++/9021 and 11005
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 11 Dec 2003 13:21:28 +1100 (EST)
- Subject: [PATCH] Fix PR C++/9021 and 11005
Hello
The following patch fixes PR C++ 9021 and 11005 on mainline.
xref_tag was overwriting the prior class attributes rather than merging
any new attributes with the old ones.
Bootstapped and regtested on i686-pc-mingw32 with no new regressions.
cp/ChangeLog
2003-12-11 Danny Smith <dannysmith@users.sourceforge.net>
PR c++/9021
PR c++/11005
* decl.c (xref_tag): Merge rather than overwrite type
attributes.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1159
diff -c -3 -p -r1.1159 decl.c
*** decl.c 10 Dec 2003 06:34:38 -0000 1.1159
--- decl.c 11 Dec 2003 01:41:52 -0000
*************** xref_tag (enum tag_types tag_code, tree
*** 9445,9452 ****
redeclare_class_template (t, current_template_parms);
}
! TYPE_ATTRIBUTES (t) = attributes;
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
}
--- 9445,9452 ----
redeclare_class_template (t, current_template_parms);
}
! TYPE_ATTRIBUTES (t) = merge_attributes (attributes, TYPE_ATTRIBUTES (t));
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
}
http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.