OK.
Jason
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 definin
On 2014-03-27 21:16, Adam Butcher wrote:
On 2014-03-27 20:45, Adam Butcher wrote:
PR c++/60573
* name-lookup.h (cp_binding_level): New field scope_defines_class_p.
* semantics.c (begin_class_definition): Set scope_defines_class_p.
* pt.c (instantiate_class_template_1): Likewise.
* parser.c (synt
On 2014-03-27 20:45, Adam Butcher wrote:
PR c++/60573
* name-lookup.h (cp_binding_level): New field scope_defines_class_p.
* semantics.c (begin_class_definition): Set scope_defines_class_p.
* pt.c (instantiate_class_template_1): Likewise.
* parser.c (synthesize_implicit_t
On 2014-03-27 20:45, Adam Butcher wrote:
@@ -8905,9 +8905,12 @@ instantiate_class_template_1 (tree type)
return type;
/* Now we're really doing the instantiation. Mark the type as in
- the process of being defined. */
+ the process of being defined... */
TYPE_BEING_DEFINED
PR c++/60573
* name-lookup.h (cp_binding_level): New field scope_defines_class_p.
* semantics.c (begin_class_definition): Set scope_defines_class_p.
* pt.c (instantiate_class_template_1): Likewise.
* parser.c (synthesize_implicit_template_parm): Use cp_bindin
On 03/26/2014 09:12 PM, Adam Butcher wrote:
+Note: cp_binding_level::class_shadowed is used as a predicate to
+indicate whether a class scope is a class-defining scope. We stop
+at the first such scope as this will be the currently open class
+defi
PR c++/60573
* parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
class_shadowed 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
On 2014-03-25 15:48, Jason Merrill wrote:
I think we need some way to designate a scope that actually
corresponds to a class-specifier.
Agreed. I'll look into it.
Adam
On 2014-03-26 15:17, Jason Merrill wrote:
I meant
struct A
{
struct X
{
struct B
{
void foo(auto);
};
void B::foo(auto) {} // { dg-error "cannot define" }
};
};
Here we push both A and X for the declarator. When we get to the
pushed X, we se
On 03/25/2014 03:48 PM, Adam Butcher wrote:
I don't follow. Are you suggesting a case like the following?
struct A
{
struct X
{
struct B
{
void foo(auto);
};
};
void X::B::foo(auto) {} // { dg-error "cannot define" }
};
I meant
s
On 2014-03-25 15:48, Jason Merrill wrote:
On 03/18/2014 10:46 PM, Adam Butcher wrote:
+ if (TYPE_BEING_DEFINED (scope->this_entity))
+ if (scope->level_chain == 0
+ || scope->this_entity != scope->level_chain->this_entity)
+ break;
I
On 03/18/2014 10:46 PM, Adam Butcher wrote:
+ if (TYPE_BEING_DEFINED (scope->this_entity))
+ if (scope->level_chain == 0
+ || scope->this_entity != scope->level_chain->this_entity)
+ break;
I don't think this is an adequate test; if yo
On 2014-03-24 17:23, Jason Merrill wrote:
On 03/18/2014 10:46 PM, Adam Butcher wrote:
- while (scope->kind == sk_class
-&& !TYPE_BEING_DEFINED (scope->this_entity))
Does it work to just change TYPE_BEING_DEFINED to
currently_open_class?
No. The object referred to by
On 03/18/2014 10:46 PM, Adam Butcher wrote:
- while (scope->kind == sk_class
-&& !TYPE_BEING_DEFINED (scope->this_entity))
Does it work to just change TYPE_BEING_DEFINED to currently_open_class?
Jason
PR c++/60573
* parser.c (synthesize_implicit_template_parm): Handle the fact that
nested class member declarations erroneously appearing in an enclosing
class contain an addition scope level for the class being defined.
PR c++/60573
* g++.dg/cpp1y/pr
16 matches
Mail list logo