gcc/testsuite/ChangeLog
2011-12-05 Fabien Chene <fabien@gcc.gnu.org>
PR c++/51319
* g++.dg/lookup/using50.C: New.
* g++.dg/lookup/using51.C: New.
gcc/cp/ChangeLog
2011-12-05 Fabien Chene <fabien@gcc.gnu.org>
PR c++/51319
* semantics.c (finish_id_expression): Strip using declarations
early in the function.
From-SVN: r182029
const char **error_msg,
location_t location)
{
+ decl = strip_using_decl (decl);
+
/* Initialize the output parameters. */
*idk = CP_ID_KIND_NONE;
*error_msg = NULL;
+2011-12-05 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/51319
+ * g++.dg/lookup/using50.C: New.
+ * g++.dg/lookup/using51.C: New.
+
2011-12-05 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51396
--- /dev/null
+// PR c++/51319
+// { dg-do compile }
+
+template<int> struct X {};
+
+struct Base
+{
+ enum { a = 1 };
+};
+
+struct Der : Base
+{
+ using Base::a;
+ typedef X<(int)a> Y;
+};
--- /dev/null
+// PR c++/51382
+// { dg-do compile }
+
+template< int Value >
+struct Base
+{
+ enum { b_e = Value };
+};
+
+template< typename Type >
+struct Derived : Type
+{
+ Type::b_e;
+ enum { d_e = b_e };
+};
+
+int v = (int)Derived< Base< 3 > >::d_e;