http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60573

--- Comment #1 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Author: abutcher
Date: Fri Mar 28 20:41:45 2014
New Revision: 208921

URL: http://gcc.gnu.org/viewcvs?rev=208921&root=gcc&view=rev
Log:
Fix PR c++/60573

    PR c++/60573
    * name-lookup.h (cp_binding_level): New transient field defining_class_p
    to indicate whether a scope is in the process of defining a class.
    * semantics.c (begin_class_definition): Set defining_class_p.
    * name-lookup.c (leave_scope): Reset defining_class_p.
    * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
    defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
    unwinding to class-defining scope to handle the erroneous definition of
    a generic function of an arbitrarily nested class within an enclosing
    class.

    PR c++/60573
    * g++.dg/cpp1y/pr60573.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/pr60573.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/cp/name-lookup.h
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to