c.opt (Wterminate): New.
authorJason Merrill <jason@redhat.com>
Wed, 6 May 2015 02:25:01 +0000 (22:25 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 6 May 2015 02:25:01 +0000 (22:25 -0400)
commit8243e2a9d0a466a907459d1b04d2d20027e5ef9b
tree9ad11d8e374ad72b911037b02842a64b8871323b
parent81b6a6c55bd5b2549dbaa16a87e736c4c8ac1bf5
c.opt (Wterminate): New.

gcc/c-family/
* c.opt (Wterminate): New.
gcc/cp/
* cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
MUST_NOT_THROW_EXPR.
(cp_genericize_data): Add try_block field.
(cp_genericize_tree): Initialize it.
* except.c (expand_end_catch_block): Set TREE_NO_WARNING on
implicit rethrow.

From-SVN: r222842
19 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/cp/except.c
gcc/doc/invoke.texi
gcc/testsuite/g++.dg/compat/eh/ctor1.h
gcc/testsuite/g++.dg/compat/eh/ctor1_y.C
gcc/testsuite/g++.dg/cpp0x/noexcept06.C
gcc/testsuite/g++.dg/cpp0x/noexcept17.C
gcc/testsuite/g++.dg/eh/cond4.C
gcc/testsuite/g++.dg/eh/ehopt1.C
gcc/testsuite/g++.dg/eh/init-temp2.C
gcc/testsuite/g++.dg/tm/noexcept-5.C
gcc/testsuite/g++.dg/torture/pr49394.C
gcc/testsuite/g++.dg/warn/Wterminate1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.mike/eh25.C
libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc
libstdc++-v3/testsuite/util/replacement_memory_operators.h