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 PR29323, wrong-code with weak functions and exceptions


On Tue, 17 Oct 2006, Richard Guenther wrote:

> On Mon, 16 Oct 2006, Kaveh R. GHAZI wrote:
> 
> > On Mon, 9 Oct 2006, Mark Mitchell wrote:
> > 
> > > Richard Guenther wrote:
> > >
> > > > 2006-10-09  Richard Guenther  <rguenther@suse.de>
> > > >
> > > > 	PR rtl-optimization/29323
> > > > 	* except.c (set_nothrow_function_flags): For functions
> > > > 	that do not bind local bail out early.
> > > >
> > > > 	* decl.c (finish_function): Set TREE_NOTHROW only for
> > > > 	functions that bind local.
> > 
> > I'm getting an error using cc for stage1, which I believe is due to this
> > patch:
> > 
> > cc -c   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC
> >   -DHAVE_CONFIG_H -I. -I. -I../../egcc-4.1-SVN20061015/gcc
> >   -I../../egcc-4.1-SVN20061015/gcc/.
> >   -I../../egcc-4.1-SVN20061015/gcc/../include -I./../intl
> >   -I../../egcc-4.1-SVN20061015/gcc/../libcpp/include
> >   -I/caip/u12/kishgcc/gcc-testing/new/_gmp/include
> >   ../../egcc-4.1-SVN20061015/gcc/except.c -o except.o
> > "../../egcc-4.1-SVN20061015/gcc/except.c", line 2705: void function cannot return value
> > cc: acomp failed for ../../egcc-4.1-SVN20061015/gcc/except.c
> > make[2]: *** [except.o] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> > 
> > This occurs because the return type of set_nothrow_function_flags is void
> > on the branches, wheres it's unsigned int on mainline.  I suspect using
> > gcc for stage 1, and all later stages issue some type of warning, but on
> > branches we don't use -Werror so it won't hard error.
> 
> Doh, right.  I'll fix this up in a sec.

Bootstrapped on x86_64-unknown-linux-gnu, applied to the branch as 
obvious.

Richard.

--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs

Index: ChangeLog
===================================================================
*** ChangeLog	(revision 117820)
--- ChangeLog	(working copy)
***************
*** 1,3 ****
--- 1,7 ----
+ 2006-10-18  Richard Guenther  <rguenther@suse.de>
+ 
+ 	* except.c (set_nothrow_function_flags): Fix return value.
+ 
  2006-10-17  Paul Brook  <paul@codesourcery.com>
  
  	Backport from mainline:
Index: except.c
===================================================================
*** except.c	(revision 117820)
--- except.c	(working copy)
*************** set_nothrow_function_flags (void)
*** 2702,2708 ****
    rtx insn;
  
    if (!targetm.binds_local_p (current_function_decl))
!     return 0;
  
    TREE_NOTHROW (current_function_decl) = 1;
  
--- 2702,2708 ----
    rtx insn;
  
    if (!targetm.binds_local_p (current_function_decl))
!     return;
  
    TREE_NOTHROW (current_function_decl) = 1;
  


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