http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #4 from vries at gcc dot gnu.org --- Tentative fix: ... diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index ee3503c..c8b328c 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -5189,7 +5189,7 @@ finish_transaction_stmt (tree stmt, tree compound_stmt, int flags, tree noex) /* noexcept specifications are not allowed for function transactions. */ gcc_assert (!(noex && compound_stmt)); - if (noex) + if (noex && flag_exceptions) { tree body = build_must_not_throw_expr (TRANSACTION_EXPR_BODY (stmt), noex); @@ -5210,7 +5210,7 @@ tree build_transaction_expr (location_t loc, tree expr, int flags, tree noex) { tree ret; - if (noex) + if (noex && flag_exceptions) { expr = build_must_not_throw_expr (expr, noex); SET_EXPR_LOCATION (expr, loc); ...