Commit aae4a277 by Mark Mitchell Committed by Mark Mitchell

re PR c++/17413 (local classes as template argument)

	PR c++/17413
	* pt.c (check_instantiated_args): Remove bogus SFINAE code.

	PR c++/17413
	* g++.dg/template/local4.C: New test.
	* g++.dg/template/crash19.C: Add dg-error marker.

From-SVN: r92562
parent 3316f968
2004-12-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17413
* pt.c (check_instantiated_args): Remove bogus SFINAE code.
* cvt.c (convert_to_void): Fix typo in comment.
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
......
......@@ -8926,9 +8926,7 @@ check_instantiated_args (tree tmpl, tree args, tsubst_flags_t complain)
if (nt)
{
if (!(complain & tf_error))
/*OK*/;
else if (TYPE_ANONYMOUS_P (nt))
if (TYPE_ANONYMOUS_P (nt))
error ("%qT uses anonymous type", t);
else
error ("%qT uses local type %qT", t, nt);
......
2004-12-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17413
* g++.dg/template/local4.C: New test.
* g++.dg/template/crash19.C: Add dg-error marker.
* g++.dg/template/crash31.C: Correct embedded PR number.
2004-12-23 Mark Mitchell <mark@codesourcery.com>
......
......@@ -9,7 +9,7 @@ template <class T>
struct X {
enum { SIXTY_FOUR=64 };
struct node {
unsigned char *ptr[sizeof(T)*SIXTY_FOUR];
unsigned char *ptr[sizeof(T)*SIXTY_FOUR]; // { dg-error "" }
void d() {}
};
node *head;
......
// PR c++/17413
template <typename T> void foo() {}
int main () {
struct S {};
// We do not simply use "local|match" on line 10 because we want to
// make sure that "local" appears.
// { dg-error "local" "" { target *-*-* } 10 }
foo<S> (); // { dg-error "match" }
}
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