Commit a9727434 by Fabien Chêne

re PR c++/51319 (Eigen3 enums not accepted)

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
parent 0fb808ea
......@@ -2893,6 +2893,8 @@ finish_id_expression (tree id_expression,
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
......
// 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;
};
// 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment