+2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/9447
+ * decl2.c (do_class_using_decl): Set type to NULL_TREE.
+ * semantics.c (finish_expr_stmt): Do not convert to void in a
+ template.
+
2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (coerce_template_parms): Refactor.
my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 980716);
- value = build_lang_decl (USING_DECL, name, unknown_type_node);
+ value = build_lang_decl (USING_DECL, name, NULL_TREE);
DECL_INITIAL (value) = TREE_OPERAND (decl, 0);
return value;
}
/* Remember the type of the expression. */
expr_type = TREE_TYPE (expr);
- if (stmts_are_full_exprs_p ())
+ if (!processing_template_decl && stmts_are_full_exprs_p ())
expr = convert_to_void (expr, "statement");
r = add_stmt (build_stmt (EXPR_STMT, expr));
+2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/9447
+ * g++.dg/template/using5.C: New test.
+
2003-07-31 Roger Sayle <roger@eyesopen.com>
* gcc.dg/builtins-27.c: New test case.
--- /dev/null
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 31 Jul 2003 <nathan@codesourcery.com>
+
+// PR 9447. further test cases for dependent using decl
+
+template <typename T> struct Base;
+
+template <typename T> struct Derived : public Base<T> {
+ using Base<T>::i;
+
+ Derived() { i; }
+
+ int get_i() { return i.f(); }
+
+};