+2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/10371
+ * semantics.c (finish_non_static_data_member): Handle when
+ both processing_template_decl and qualifying_scope are true.
+
2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11076
return error_mark_node;
}
TREE_USED (current_class_ptr) = 1;
- if (processing_template_decl)
+ if (processing_template_decl && !qualifying_scope)
{
tree type = TREE_TYPE (decl);
}
}
+ /* If PROCESSING_TEMPLATE_DECL is non-zero here, then
+ QUALIFYING_SCOPE is also non-null. Wrap this in a SCOPE_REF
+ for now. */
+ if (processing_template_decl)
+ return build_min (SCOPE_REF, TREE_TYPE (decl),
+ qualifying_scope, DECL_NAME (decl));
+
perform_or_defer_access_check (TYPE_BINFO (access_type), decl);
/* If the data member was named `C::M', convert `*this' to `C'
+2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/10371
+ * g++.dg/lookup/scoped8.C: New test.
+
2003-10-25 Eric Botcazou <ebotcazou@libertysurf.fr>
* g++.dg/opt/reg-stack3.C: New test.
--- /dev/null
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+// PR c++/10371: Incorrect tree node built in
+// finish_non_static_data_member.
+
+struct A
+{
+ int i; // { dg-error "object missing" }
+};
+
+template <int> struct B
+{
+ int foo() { return A::i; } // { dg-error "this location" }
+};