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

manu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jul 7 22:19:00 GMT 2009



------- 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=gcc&view=rev&rev=149354
Log:
2009-07-08  Manuel López-Ibáñez  <manu@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



More information about the Gcc-bugs mailing list