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 tree-optimization/17697


On Tue, 28 Sep 2004 15:52:17 -0400, Jakub Jelinek <jakub@redhat.com> wrote:

> I'd still appreciate if C++ frontend folks looked at duplicate_decls
> and fixed the bogus clearing of TREE_NOTHROW flag if both the builtin
> is throw () and declaration in program too.

Fixed thus.  Tested x86_64-pc-linux-gnu, applied to trunk.

2004-09-29  Jason Merrill  <jason@redhat.com>

	PR tree-optimization/17697
	* decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.

*** cp/decl.c.~1~	2004-09-28 14:17:20.000000000 -0400
--- cp/decl.c	2004-09-29 11:49:18.887533042 -0400
*************** duplicate_decls (tree newdecl, tree oldd
*** 1719,1724 ****
--- 1719,1726 ----
  	TREE_READONLY (olddecl) = 1;
        if (TREE_THIS_VOLATILE (newdecl))
  	TREE_THIS_VOLATILE (olddecl) = 1;
+       if (TREE_NOTHROW (newdecl))
+ 	TREE_NOTHROW (olddecl) = 1;
  
        /* Merge the initialization information.  */
        if (DECL_INITIAL (newdecl) == NULL_TREE

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