]> git.ipfire.org Git - thirdparty/gcc.git/commit
Support noexcept-specifications for transaction statements and expressions.
authorTorvald Riegel <triegel@redhat.com>
Mon, 12 Dec 2011 12:05:37 +0000 (12:05 +0000)
committerTorvald Riegel <torvald@gcc.gnu.org>
Mon, 12 Dec 2011 12:05:37 +0000 (12:05 +0000)
commitf0f3286a5a9af9c4b0d0af7a567c4f465f8fc382
treeb258a4e01b1d5c494d1ec5b230e7af9499701e88
parentf2162c3daa351c9ceeceaea0f033595f90f858ca
Support noexcept-specifications for transaction statements and expressions.

gcc/cp/
* semantics.c (finish_transaction_stmt, build_transaction_expr):
Accept new noexcept parameter and handle it.
* cp-tree.h (finish_transaction_stmt, build_transaction_expr): Adapt
declarations.
* parser.c (cp_parser_exception_specification_opt): Extract
noexcept-specification parsing to ...
(cp_parser_noexcept_specification_opt): ...here.  Allow for parsing
non-constexpr noexcept arguments.
(cp_parser_transaction, cp_parser_transaction_expression): Parse
and handle noexcept-specifications.
(cp_parser_function_transaction): Adapt to finish_transaction_stmt
change.
* pt.c (tsubst_expr): Adapt to new noexcept parameters when
building transactions.

gcc/testsuite/
* g++.dg/tm/noexcept-1.C: New test.
* g++.dg/tm/noexcept-2.C: New test.
* g++.dg/tm/noexcept-3.C: New test.
* g++.dg/tm/noexcept-4.C: New test.
* g++.dg/tm/noexcept-5.C: New test.

From-SVN: r182234
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tm/noexcept-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tm/noexcept-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tm/noexcept-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tm/noexcept-4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tm/noexcept-5.C [new file with mode: 0644]