[Bug c++/31246] -Wunreachable-code warnings for compiler-generated code

2009-07-07 Thread manu at gcc dot gnu dot org


--- Comment #29 from manu at gcc dot gnu dot org  2009-07-07 22:18 ---
Subject: Bug 31246

Author: manu
Date: Tue Jul  7 22:18:35 2009
New Revision: 149354

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=149354
Log:
2009-07-08  Manuel López-Ibáñez  m...@gcc.gnu.org

PR c++/31246
* gimplify.c (gimplify_expr): Propagate no_warning flag when
gimplifying.
* gimple (gimple_build_call_from_tree): Likewise.
* tree-cfg.c (remove_useless_stmts_warn_notreached): Check
no_warning flag before warning.
cp/
* init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
code.
* cp-gimplify.c (genericize_eh_spec_block): Likewise.

testsuite/  
* g++.dg/warn/pr31246.C: New.
* g++.dg/warn/pr31246-2.C: New.

Added:
trunk/gcc/testsuite/g++.dg/warn/pr31246-2.C
trunk/gcc/testsuite/g++.dg/warn/pr31246.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/cp/init.c
trunk/gcc/gimple.c
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfg.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246



[Bug c++/31246] -Wunreachable-code warnings for compiler-generated code

2009-07-07 Thread manu at gcc dot gnu dot org


--- Comment #30 from manu at gcc dot gnu dot org  2009-07-07 22:20 ---
FIXED in GCC 4.5.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246



[Bug c++/31246] -Wunreachable-code warnings for compiler-generated code

2009-02-07 Thread manu at gcc dot gnu dot org


--- Comment #28 from manu at gcc dot gnu dot org  2009-02-07 21:07 ---
There is a patch here:

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00972.html


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||10/msg00972.html
   Keywords||patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246



[Bug c++/31246] -Wunreachable-code warnings for compiler-generated code

2008-10-22 Thread manu at gcc dot gnu dot org


--- Comment #27 from manu at gcc dot gnu dot org  2008-10-22 08:35 ---
(In reply to comment #5)
 Note, however, that, as far as I can see, such try/catch are *not* in the
 library code proper, but *all* synthesized by the C++ front-end.

Does anyone has any idea where in the C++ front-end this is synthesized?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246



[Bug c++/31246] -Wunreachable-code warnings for compiler-generated code

2008-08-25 Thread gdr at integrable-solutions dot net


--- Comment #26 from gdr at integrable-solutions dot net  2008-08-26 05:45 
---
Subject: Re:  Strange -Wunreachable-code warning with _GLIBCXX_DEBUG

On Sat, Aug 23, 2008 at 1:43 PM, paolo dot carlini at oracle dot com
[EMAIL PROTECTED] wrote:
 --- Comment #23 from paolo dot carlini at oracle dot com  2008-08-23 
 18:43 ---
 To be clear, there are no #pragma GCC system_header at all in the entire
 libsupc++ directory. I hope we don't have to begin...

I think I agree.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246



[Bug c++/31246] -Wunreachable-code warnings for compiler-generated code

2008-08-23 Thread manu at gcc dot gnu dot org


--- Comment #25 from manu at gcc dot gnu dot org  2008-08-23 18:50 ---
This looks clearer to me. Maybe Jason or Mark have some idea where this code is
generated. It should be clear that it is compiler-generated and we can set
DECL_ARTIFICIAL or TREE_NO_WARNING. Then we just have to make sure to propagate
that. And finally, check it before warning.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|Strange -Wunreachable-code  |-Wunreachable-code warnings
   |warnings|for compiler-generated code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246