Commit c77e0597 by Jason Merrill

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
parent b10af5a4
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 "" }
......@@ -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 ()
{
......
//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 -
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