Commit 07a6816e by Paolo Carlini Committed by Paolo Carlini

re PR c++/71662 ([DR 1485] ICE on invalid C++11 code with unqualified name look…

re PR c++/71662 ([DR 1485] ICE on invalid C++11 code with unqualified name look up: in tsubst_copy, at cp/pt.c:14010)

2018-02-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/71662
	* g++.dg/cpp0x/scoped_enum7.C: New.

From-SVN: r257439
parent f8e54f64
2018-02-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71662
* g++.dg/cpp0x/scoped_enum7.C: New.
2018-02-07 Christophe Lyon <christophe.lyon@linaro.org> 2018-02-07 Christophe Lyon <christophe.lyon@linaro.org>
PR tree-optimization/83008 PR tree-optimization/83008
......
// PR c++/71662
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-return-type" }
template < typename T > struct A
{
enum E : T;
E h ();
};
A < int > a;
A < int >::E b = a.h ();
template < typename T > enum A < T >::E : T { e }; // { dg-message "enumeration" }
template < typename T > typename A < T >::E A < T >::h ()
{
return e; // { dg-error "declared" }
}
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