PR c++/8316, c++/9315, c++/10136

PR c++/8316, c++/9315, c++/10136
        * call.c (print_z_candidate): Split out from...
        (print_z_candidiates): ...here.
        (joust): Use it.

From-SVN: r64650
This commit is contained in:
Jason Merrill 2003-03-21 02:12:50 -05:00
parent b10af5a419
commit c77e059777
3 changed files with 23 additions and 23 deletions

View File

@ -0,0 +1,21 @@
typedef __SIZE_TYPE__ size_t;
void *operator new(size_t, unsigned int);
struct X{
X();
X(int);
};
void f(X *x = new X); // { dg-error "" }
void f(X *x = new X(4)); // { dg-error "" }
void f(X *x = new X[4]); // { dg-error "" }
void f(X *x = new (3) X(6)); // { dg-error "" }
void f(X *x = new (2) X[10]); // { dg-error "" }
// { dg-error "candidate" "" { target *-*-* } 00 }
void f(X *x = new X[10][5]); // { dg-error "" }

View File

@ -11,8 +11,8 @@ struct X
{
X (int);
};
void Foo (int, float, bool);
void Foo (float, int, X);
void Foo (int, float, bool); // WARNING - candidate
void Foo (float, int, X); // WARNING - candidate
void Baz ()
{

View File

@ -1,21 +0,0 @@
//Build don't link:
typedef __SIZE_TYPE__ size_t;
void *operator new(size_t, unsigned int);
struct X{
X();
X(int);
};
void f(X *x = new X); // ERROR -
void f(X *x = new X(4)); // ERROR -
void f(X *x = new X[4]); // ERROR -
void f(X *x = new (3) X(6)); // ERROR -
void f(X *x = new (2) X[10]); // ERROR -
void f(X *x = new X[10][5]); // ERROR -