diff options
author | Jason Merrill <jason@redhat.com> | 2015-05-05 22:25:01 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-05-05 22:25:01 -0400 |
commit | 8243e2a9d0a466a907459d1b04d2d20027e5ef9b (patch) | |
tree | 9ad11d8e374ad72b911037b02842a64b8871323b /gcc/c-family | |
parent | 81b6a6c55bd5b2549dbaa16a87e736c4c8ac1bf5 (diff) | |
download | gcc-8243e2a9d0a466a907459d1b04d2d20027e5ef9b.zip gcc-8243e2a9d0a466a907459d1b04d2d20027e5ef9b.tar.gz gcc-8243e2a9d0a466a907459d1b04d2d20027e5ef9b.tar.bz2 |
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
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 8c2e933..9d16d43 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2015-05-05 Jason Merrill <jason@redhat.com> + + * c.opt (Wterminate): New. + 2015-04-30 Marek Polacek <polacek@redhat.com> * c-common.c (maybe_warn_bool_compare): When comparing with 0/1, diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 983f4a8..8ef0cea 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -829,6 +829,10 @@ Wsystem-headers C ObjC C++ ObjC++ Warning ; Documented in common.opt +Wterminate +C++ ObjC++ Warning Var(warn_terminate) Init(1) +Warn if a throw expression will always result in a call to terminate() + Wtraditional C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning Warn about features not present in traditional C |