[Bug c++/71909] [4.9/5/6/7 Regression] g++ accepts an unreachable function catch block that lacks a corresponding try

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 20 14:02:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71909

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jul 20 14:01:30 2016
New Revision: 238521

URL: https://gcc.gnu.org/viewcvs?rev=238521&root=gcc&view=rev
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/parse/pr71909.C
    trunk/gcc/testsuite/g++.dg/tm/pr71909.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list