OSDN Git Service

Support noexcept-specifications for transaction statements and expressions.
authortorvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Dec 2011 12:05:37 +0000 (12:05 +0000)
committertorvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Dec 2011 12:05:37 +0000 (12:05 +0000)
commitf770bf539d878932610b858b44971478cb8c3825
treeb258a4e01b1d5c494d1ec5b230e7af9499701e88
parentf9069149bc72f85750425dc89b7075cb1572b438
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182234 138bc75d-0d04-0410-961f-82ee72b054a4
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]