PR c++/9820
* search.c (lookup_member): Fix handling of functions in a class
being defined.
From-SVN: r64193
+2003-03-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/9820
+ * search.c (lookup_member): Fix handling of functions in a class
+ being defined.
+
2003-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/8700
const char *errstr = 0;
+ /* Sanity check. */
+ if (TREE_CODE (name) != IDENTIFIER_NODE)
+ abort ();
+
if (xbasetype == current_class_type && TYPE_BEING_DEFINED (xbasetype)
&& IDENTIFIER_CLASS_VALUE (name))
{
tree field = IDENTIFIER_CLASS_VALUE (name);
- if (TREE_CODE (field) != FUNCTION_DECL
+ if (! is_overloaded_fn (field)
&& ! (want_type && TREE_CODE (field) != TYPE_DECL))
/* We're in the scope of this class, and the value has already
been looked up. Just return the cached value. */
--- /dev/null
+// PR c++/9820
+
+template <typename T> struct X {
+ template<typename> static int test(...);
+ template<typename> static int test(int *);
+
+ static const int i = sizeof(X<T>::template test<int>(0));
+};
+
+template class X<int>;