mirror of git://gcc.gnu.org/git/gcc.git
call.c (convert_like_real): Use inform for identifying the declaration point.
* call.c (convert_like_real): Use inform for identifying the declaration point. From-SVN: r210332
This commit is contained in:
parent
da7316cbac
commit
83afe9ef89
|
|
@ -1,3 +1,8 @@
|
||||||
|
2014-05-12 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* call.c (convert_like_real): Use inform for identifying the
|
||||||
|
declaration point.
|
||||||
|
|
||||||
2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
|
2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* cvt.c (cp_convert_to_pointer): Don't call error_at if
|
* cvt.c (cp_convert_to_pointer): Don't call error_at if
|
||||||
|
|
|
||||||
|
|
@ -6256,8 +6256,8 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
|
||||||
return expr;
|
return expr;
|
||||||
expr = build_temp (expr, totype, flags, &diag_kind, complain);
|
expr = build_temp (expr, totype, flags, &diag_kind, complain);
|
||||||
if (diag_kind && fn && complain)
|
if (diag_kind && fn && complain)
|
||||||
emit_diagnostic (diag_kind, DECL_SOURCE_LOCATION (fn), 0,
|
inform (DECL_SOURCE_LOCATION (fn),
|
||||||
" initializing argument %P of %qD", argnum, fn);
|
" initializing argument %P of %qD", argnum, fn);
|
||||||
return build_cplus_new (totype, expr, complain);
|
return build_cplus_new (totype, expr, complain);
|
||||||
|
|
||||||
case ck_ref_bind:
|
case ck_ref_bind:
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ struct B {
|
||||||
B(B&&) = default; // { dg-error "implicitly deleted|use of deleted" }
|
B(B&&) = default; // { dg-error "implicitly deleted|use of deleted" }
|
||||||
};
|
};
|
||||||
|
|
||||||
void g(B); // { dg-error "argument 1" }
|
void g(B); // { dg-message "argument 1" }
|
||||||
B&& f();
|
B&& f();
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ struct B : A
|
||||||
B(B&); // { dg-message "note" "" }
|
B(B&); // { dg-message "note" "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
void foo(B); // { dg-error "initializing" }
|
void foo(B); // { dg-message "initializing" }
|
||||||
|
|
||||||
void bar()
|
void bar()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ struct B
|
||||||
|
|
||||||
struct A
|
struct A
|
||||||
{
|
{
|
||||||
A (B); // { dg-error "initializing" }
|
A (B); // { dg-message "initializing" }
|
||||||
};
|
};
|
||||||
|
|
||||||
B
|
B
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
struct A { };
|
struct A { };
|
||||||
|
|
||||||
void f (A); // { dg-error "argument 1" }
|
void f (A); // { dg-message "" }
|
||||||
void (*g)(A);
|
void (*g)(A);
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace N1 {
|
||||||
X(); // { dg-message "note" }
|
X(); // { dg-message "note" }
|
||||||
explicit X(const X&);
|
explicit X(const X&);
|
||||||
};
|
};
|
||||||
void f(X); // { dg-error "initializing" }
|
void f(X); // { dg-message "initializing" }
|
||||||
int foo()
|
int foo()
|
||||||
{
|
{
|
||||||
X x;
|
X x;
|
||||||
|
|
@ -24,7 +24,7 @@ namespace N2 {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void f(T ) {} // { dg-error "initializing" }
|
void f(T) {} // { dg-message "initializing" }
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
int foo()
|
int foo()
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ class A; // { dg-error "forward declaration" }
|
||||||
|
|
||||||
template <typename T> struct X
|
template <typename T> struct X
|
||||||
{
|
{
|
||||||
static int f (T); // { dg-error "initializing" }
|
static int f (T); // { dg-message "initializing" }
|
||||||
static const T &make ();
|
static const T &make ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ class A; // { dg-error "forward declaration" }
|
||||||
|
|
||||||
template <typename T> struct X
|
template <typename T> struct X
|
||||||
{
|
{
|
||||||
static int f (T); // { dg-error "initializing" }
|
static int f (T); // { dg-message "initializing" }
|
||||||
static const T &make ();
|
static const T &make ();
|
||||||
static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of incomplete type" }
|
static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of incomplete type" }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
class A; // { dg-error "forward declaration" }
|
class A; // { dg-error "forward declaration" }
|
||||||
|
|
||||||
int f (A); // { dg-error "initializing" }
|
int f (A); // { dg-message "initializing" }
|
||||||
const A &make ();
|
const A &make ();
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ public:
|
||||||
B(void) {}
|
B(void) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
void f(B b) { // { dg-error "initializing" }
|
void f(B b) { // { dg-message "initializing" }
|
||||||
}
|
}
|
||||||
|
|
||||||
void g() {
|
void g() {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ struct Derived : Base { Derived() {} };
|
||||||
|
|
||||||
auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; }
|
auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; }
|
||||||
void g(auto_ptr<Derived>) { }
|
void g(auto_ptr<Derived>) { }
|
||||||
void h(auto_ptr<Base>) { } // { dg-error "initializing" }
|
void h(auto_ptr<Base>) { } // { dg-message "initializing" }
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
auto_ptr<Base> x(f());
|
auto_ptr<Base> x(f());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// { dg-do assemble }
|
// { dg-do assemble }
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void f(T) {} // { dg-error "initializing" }
|
void f(T) {} // { dg-message "initializing" }
|
||||||
|
|
||||||
class C; // { dg-error "forward declaration" }
|
class C; // { dg-error "forward declaration" }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue