[Bug c++/70218] [5/6 Regression] Illegal access to private fields succeeds with 5/6

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 18 01:24:00 GMT 2016


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

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Fri Mar 18 01:23:26 2016
New Revision: 234316

URL: https://gcc.gnu.org/viewcvs?rev=234316&root=gcc&view=rev
Log:
Fix PR c++/70218 (illegal access to private field succeeds)

gcc/cp/ChangeLog:

        PR c++/70218
        * parser.c (cp_parser_lambda_expression): Move call to
        pop_deferring_access_checks ahead of the call to
        cp_parser_end_tentative_firewall.

gcc/testsuite/ChangeLog:

        PR c++/70218
        * g++.dg/cpp0x/lambda/lambda-70218.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70218.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list