+2004-11-12 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/18389
+ * decl.c (start_decl): Make sure to set *pop_scope_p. Return
+ error_mark_node to indicate errors.
+
+ PR c++/18436
+ * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
+ unqualified name resolves to a member function.
+
+ PR c++/18407
+ * pt.c (tsubst_copy_and_build): Handle qualified names used from a
+ derived class correctly.
+
2004-11-04 Release Manager
* GCC 3.4.3 released.
deprecated_state = DEPRECATED_NORMAL;
if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE)
- return NULL_TREE;
+ return error_mark_node;
type = TREE_TYPE (decl);
if (type == error_mark_node)
- return NULL_TREE;
+ return error_mark_node;
context = DECL_CONTEXT (decl);
lookup finds a non-function, in accordance with the
expected resolution of DR 218. */
if (koenig_p
- && (is_overloaded_fn (function)
+ && ((is_overloaded_fn (function)
+ /* If lookup found a member function, the Koenig lookup is
+ not appropriate, even if an unqualified-name was used
+ to denote the function. */
+ && !DECL_FUNCTION_MEMBER_P (get_first_fn (function)))
|| TREE_CODE (function) == IDENTIFIER_NODE))
function = perform_koenig_lookup (function, call_args);
/*is_type_p=*/false,
/*complain=*/false);
if (BASELINK_P (member))
- BASELINK_FUNCTIONS (member)
- = build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member),
- args);
+ {
+ BASELINK_FUNCTIONS (member)
+ = build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member),
+ args);
+ member = (adjust_result_of_qualified_name_lookup
+ (member, BINFO_TYPE (BASELINK_BINFO (member)),
+ TREE_TYPE (object)));
+ }
else
{
qualified_name_lookup_error (TREE_TYPE (object), tmpl);
+2004-11-12 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/18389
+ * g++.dg/parse/cond1.C: New test.
+
+ PR c++/18436
+ * g++.dg/template/call3.C: New test.
+
+ PR c++/18407
+ * g++.dg/template/ptrmem11.C: New test.
+
2004-11-12 Eric Botcazou <ebotcazou@act-europe.fr>
* gcc.c-torture/execute/20041112-1.c: New test.