]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/71909 (g++ accepts an unreachable function catch block that lacks a corresp...
authorJakub Jelinek <jakub@redhat.com>
Wed, 20 Jul 2016 14:16:40 +0000 (16:16 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 20 Jul 2016 14:16:40 +0000 (16:16 +0200)
commit323d171f9019dff605e78c6d027348e8d38b7e00
treee7e7c41169c34fd6c1042b166ff7dbbfe3ad1db7
parent46f2e7001b112259cf745ca9d05c5f12b414ce36
re PR c++/71909 (g++ accepts an unreachable function catch block that lacks a corresponding try)

PR c++/71909
* parser.c (cp_parser_save_member_function_body): Consume
__transaction_relaxed or __transaction_atomic with optional
attribute.  Only skip catch with block if try keyword is seen.

* g++.dg/parse/pr71909.C: New test.
* g++.dg/tm/pr71909.C: New test.

From-SVN: r238526
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/pr71909.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tm/pr71909.C [new file with mode: 0644]