diff options
author | Adam Butcher <abutcher@gcc.gnu.org> | 2014-03-28 20:41:45 +0000 |
---|---|---|
committer | Adam Butcher <abutcher@gcc.gnu.org> | 2014-03-28 20:41:45 +0000 |
commit | 5294e4c32d617f2a52e47fb08d9b83b83885f469 (patch) | |
tree | 4b3b534d549cd7d1a2b7dadf8525239410356854 /gcc/expr.c | |
parent | eee32b5ea3226842340d5779d5f02af7951d3842 (diff) | |
download | gcc-5294e4c32d617f2a52e47fb08d9b83b83885f469.zip gcc-5294e4c32d617f2a52e47fb08d9b83b83885f469.tar.gz gcc-5294e4c32d617f2a52e47fb08d9b83b83885f469.tar.bz2 |
re PR c++/60573 ([c++1y] ICE with defining generic function of nested class in class scope)
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.
From-SVN: r208921
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions