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:01:30 +0000 (16:01 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 20 Jul 2016 14:01:30 +0000 (16:01 +0200)
commit7419f4417a33ff9143317794aa985f7681d1e2a0
tree1d243343f1193d9977b24d69c9e1935d177ad3d1
parent109d2197c31b766daf9c7b138bc7eeaab12985df
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: r238521
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]