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] [C++] Fix C++/13507



On Dec 31, 2003, at 19:01, Gabriel Dos Reis wrote:
| Okay for the backported version?

The backported version is preferable -- it is easier to track
comparable versions than totally different ones.

Here is the patch that I applied after bootstrapping and checking for no regressions.


Thanks,
Andrew Pinski

ChangeLog:

2003-12-20 Andrew Pinski <pinskia@physics.uc.edu>

	Backport from mainline:
	2003-12-30  Nathan Sidwell  <nathan@codesourcery.com>

		PR c++/13507
		* decl.c (duplicate_decls): Use build_type_attribute_variant to
		merge attributes.


Index: decl.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v retrieving revision 1.965.2.68 diff -u -p -r1.965.2.68 decl.c --- decl.c 29 Dec 2003 05:32:29 -0000 1.965.2.68 +++ decl.c 1 Jan 2004 03:27:51 -0000 @@ -3416,10 +3416,12 @@ duplicate_decls (newdecl, olddecl) for anitipated built-ins, for exception lists, etc... */ else if (DECL_ANTICIPATED (olddecl)) { - TYPE_ATTRIBUTES (TREE_TYPE (newdecl)) - = (*targetm.merge_type_attributes) (TREE_TYPE (olddecl), - TREE_TYPE (newdecl)); - TREE_TYPE (olddecl) = TREE_TYPE (newdecl); + tree type = TREE_TYPE (newdecl); + tree attribs = (*targetm.merge_type_attributes) + (TREE_TYPE (olddecl), type); + + type = build_type_attribute_variant (type, attribs); + TREE_TYPE (newdecl) = TREE_TYPE (olddecl) = type; }

/* Whether or not the builtin can throw exceptions has no


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