[Bug c++/89682] [9 Regression] g++9 incorrectly disallows using private static method as default arg to ctor of template type

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 18 15:58:00 GMT 2019


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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Mar 18 15:58:24 2019
New Revision: 269766

URL: https://gcc.gnu.org/viewcvs?rev=269766&root=gcc&view=rev
Log:
        PR c++/89682 - wrong access error in default argument.

Here we were pushing into the right access context, but we were called from
a deferred checking context, so didn't end up doing the checks until after
we left the access context.

        * pt.c (tsubst_default_argument): Don't defer access checks.

Added:
    trunk/gcc/testsuite/g++.dg/overload/defarg12.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c


More information about the Gcc-bugs mailing list