diff options
author | Paolo Bonzini <bonzini@gcc.gnu.org> | 2009-12-15 00:20:03 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2009-12-15 00:20:03 +0000 |
commit | 6ba6f70d7fa8fa889576172a23c199a51abdd045 (patch) | |
tree | cfeb179f5b57de2147e03bd05038051732204246 /gcc/testsuite | |
parent | 9ed796d78bd95091e6715200c029c812047f843c (diff) | |
download | gcc-6ba6f70d7fa8fa889576172a23c199a51abdd045.tar.gz |
[multiple changes]
2009-12-15 Paolo Bonzini <bonzini@gnu.org>
Shujing Zhao <pearly.zhao@oracle.com>
* intl.c (get_spaces): New.
* intl.h (get_spaces): New.
cp:
2009-12-15 Paolo Bonzini <bonzini@gnu.org>
Shujing Zhao <pearly.zhao@oracle.com>
* Makefile.in (cp/pt.o): Depend on intl.h
* call.c (print_z_candidates): Make loop more compact,
choose head string depending on number of candidates,
extract creation of spaces string to intl.c.
* pt.c (print_overloaded_functions): Replace with...
(print_candidates_1): ... this rewrite.
(print_candidates): Rewrite to call print_candidates_1.
(most_specialized_class): Make loop more compact,
choose head string depending on number of candidates,
and size indents depending on translations.
testsuite:
2009-12-15 Shujing Zhao <pearly.zhao@oracle.com>
* g++.dg/other/error20.C: Adjust dg-message strings.
* g++.dg/other/error31.C: Likewise.
* g++.dg/rtti/typeid6.C: Likewise.
* g++.dg/ext/ms-1.C: Likewise.
* g++.dg/parse/error19.C: Likewise.
* g++.dg/parse/crash5.C: Likewise.
* g++.dg/cpp0x/explicit4.C: Likewise.
* g++.dg/template/ptrmem4.C: Likewise.
* g++.dg/template/crash37.C: Likewise.
* g++.dg/template/qualttp5.C: Likewise.
* g++.dg/template/local6.C: Likewise.
* g++.dg/template/instantiate5.C: Likewise.
* g++.old-deja/g++.brendan/overload1.C: Likewise.
* g++.old-deja/g++.brendan/cvt3.C: Likewise.
* g++.old-deja/g++.brendan/overload4.C: Likewise.
* g++.old-deja/g++.jason/conversion11.C: Likewise.
* g++.old-deja/g++.jason/scoping10.C: Likewise.
* g++.old-deja/g++.other/expr1.C: Likewise.
* g++.old-deja/g++.other/pmf3.C: Likewise.
* g++.old-deja/g++.other/crash24.C: Likewise.
* g++.old-deja/g++.niklas/t120.C: Likewise.
* g++.old-deja/g++.niklas/t121.C: Likewise.
* g++.old-deja/g++.law/operators9.C: Likewise.
* g++.old-deja/g++.law/arm9.C: Likewise.
* g++.old-deja/g++.law/enum4.C: Likewise.
* g++.old-deja/g++.law/arg11.C: Likewise.
* g++.old-deja/g++.benjamin/15800-1.C: Likewise.
* g++.old-deja/g++.mike/p2431.C: Likewise.
* g++.old-deja/g++.mike/p438.C: Likewise.
* g++.old-deja/g++.mike/p9068.C: Likewise.
* g++.old-deja/g++.mike/p11110.C: Likewise.
* g++.old-deja/g++.bugs/900330_02.C: Likewise.
From-SVN: r155245
Diffstat (limited to 'gcc/testsuite')
33 files changed, 67 insertions, 32 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bc25d6197ce..29f02c097c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,38 @@ +2009-12-15 Shujing Zhao <pearly.zhao@oracle.com> + + * g++.dg/other/error20.C: Adjust dg-message strings. + * g++.dg/other/error31.C: Likewise. + * g++.dg/rtti/typeid6.C: Likewise. + * g++.dg/ext/ms-1.C: Likewise. + * g++.dg/parse/error19.C: Likewise. + * g++.dg/parse/crash5.C: Likewise. + * g++.dg/cpp0x/explicit4.C: Likewise. + * g++.dg/template/ptrmem4.C: Likewise. + * g++.dg/template/crash37.C: Likewise. + * g++.dg/template/qualttp5.C: Likewise. + * g++.dg/template/local6.C: Likewise. + * g++.dg/template/instantiate5.C: Likewise. + * g++.old-deja/g++.brendan/overload1.C: Likewise. + * g++.old-deja/g++.brendan/cvt3.C: Likewise. + * g++.old-deja/g++.brendan/overload4.C: Likewise. + * g++.old-deja/g++.jason/conversion11.C: Likewise. + * g++.old-deja/g++.jason/scoping10.C: Likewise. + * g++.old-deja/g++.other/expr1.C: Likewise. + * g++.old-deja/g++.other/pmf3.C: Likewise. + * g++.old-deja/g++.other/crash24.C: Likewise. + * g++.old-deja/g++.niklas/t120.C: Likewise. + * g++.old-deja/g++.niklas/t121.C: Likewise. + * g++.old-deja/g++.law/operators9.C: Likewise. + * g++.old-deja/g++.law/arm9.C: Likewise. + * g++.old-deja/g++.law/enum4.C: Likewise. + * g++.old-deja/g++.law/arg11.C: Likewise. + * g++.old-deja/g++.benjamin/15800-1.C: Likewise. + * g++.old-deja/g++.mike/p2431.C: Likewise. + * g++.old-deja/g++.mike/p438.C: Likewise. + * g++.old-deja/g++.mike/p9068.C: Likewise. + * g++.old-deja/g++.mike/p11110.C: Likewise. + * g++.old-deja/g++.bugs/900330_02.C: Likewise. + 2009-12-14 Uros Bizjak <ubizjak@gmail.com> * g++.dg/other/i386-2.C: Add -mpopcnt -mabm -mlwp to dg-options. diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit4.C b/gcc/testsuite/g++.dg/cpp0x/explicit4.C index 74726a99cad..67c60f67928 100644 --- a/gcc/testsuite/g++.dg/cpp0x/explicit4.C +++ b/gcc/testsuite/g++.dg/cpp0x/explicit4.C @@ -2,7 +2,7 @@ // { dg-options "-std=c++0x" } struct A { - A(const A&, int = 0); // { dg-message "candidates" } + A(const A&, int = 0); // { dg-message "candidate" } }; struct B { diff --git a/gcc/testsuite/g++.dg/ext/ms-1.C b/gcc/testsuite/g++.dg/ext/ms-1.C index dcd1d0466ef..3963b7561d1 100644 --- a/gcc/testsuite/g++.dg/ext/ms-1.C +++ b/gcc/testsuite/g++.dg/ext/ms-1.C @@ -10,7 +10,7 @@ struct X void Quux (void (X::*) ()); -void X::Foo (X *ptr) // { dg-message "candidates" } +void X::Foo (X *ptr) // { dg-message "candidate" } { Quux (Foo); // { dg-error "no matches" } Quux (Bar); diff --git a/gcc/testsuite/g++.dg/other/error20.C b/gcc/testsuite/g++.dg/other/error20.C index 50a4495cff9..6033c0e783d 100644 --- a/gcc/testsuite/g++.dg/other/error20.C +++ b/gcc/testsuite/g++.dg/other/error20.C @@ -2,7 +2,7 @@ // { dg-do compile } struct A -{ // { dg-message "candidates" } +{ // { dg-message "candidate is" } virtual A foo (); }; diff --git a/gcc/testsuite/g++.dg/other/error31.C b/gcc/testsuite/g++.dg/other/error31.C index c9e8351bcf3..c4095504d6d 100644 --- a/gcc/testsuite/g++.dg/other/error31.C +++ b/gcc/testsuite/g++.dg/other/error31.C @@ -3,7 +3,7 @@ // { dg-options "" } // { dg-bogus "not supported by" "" { target *-*-* } 0 } -struct A {}; // { dg-message "note: candidates are" } +struct A {}; // { dg-message "note: candidate is" } void foo () diff --git a/gcc/testsuite/g++.dg/parse/crash5.C b/gcc/testsuite/g++.dg/parse/crash5.C index acf9e9d4bba..4597d6cf9af 100644 --- a/gcc/testsuite/g++.dg/parse/crash5.C +++ b/gcc/testsuite/g++.dg/parse/crash5.C @@ -1,7 +1,7 @@ // { dg-options "-w" } class QString { // { dg-error "previous definition" } - QString (const QString & a); // { dg-message "candidates" } + QString (const QString & a); // { dg-message "candidate is" } }; class QString { }; // { dg-error "redefinition" } diff --git a/gcc/testsuite/g++.dg/parse/error19.C b/gcc/testsuite/g++.dg/parse/error19.C index 5582891c974..39c2d785837 100644 --- a/gcc/testsuite/g++.dg/parse/error19.C +++ b/gcc/testsuite/g++.dg/parse/error19.C @@ -2,7 +2,7 @@ // PR C++/17867 struct A -{ // { dg-message "1:candidates are:" } +{ // { dg-message "1:candidate is:" } A(int); }; diff --git a/gcc/testsuite/g++.dg/rtti/typeid6.C b/gcc/testsuite/g++.dg/rtti/typeid6.C index 18709b4976d..adc5bbb02fb 100644 --- a/gcc/testsuite/g++.dg/rtti/typeid6.C +++ b/gcc/testsuite/g++.dg/rtti/typeid6.C @@ -7,5 +7,5 @@ namespace std template<int> void foo() { - !typeid(void); // { dg-error "!typeid\\(void\\)|candidates" } + !typeid(void); // { dg-error "!typeid\\(void\\)|candidate is" } } diff --git a/gcc/testsuite/g++.dg/template/crash37.C b/gcc/testsuite/g++.dg/template/crash37.C index 8af516018f7..aef0df0846e 100644 --- a/gcc/testsuite/g++.dg/template/crash37.C +++ b/gcc/testsuite/g++.dg/template/crash37.C @@ -11,7 +11,7 @@ struct coperator_stack struct helper {}; template<class F> -void bla(F f) // { dg-message "candidates" } +void bla(F f) // { dg-message "candidate is" } { } diff --git a/gcc/testsuite/g++.dg/template/instantiate5.C b/gcc/testsuite/g++.dg/template/instantiate5.C index 70ed2b059f9..9cdf310c738 100644 --- a/gcc/testsuite/g++.dg/template/instantiate5.C +++ b/gcc/testsuite/g++.dg/template/instantiate5.C @@ -13,7 +13,7 @@ int baz() { return A<0>::i; } struct B { - static void foo (int); // { dg-message "candidates" } + static void foo (int); // { dg-message "candidate is" } }; template <typename T> struct C diff --git a/gcc/testsuite/g++.dg/template/local6.C b/gcc/testsuite/g++.dg/template/local6.C index 7094e7480d8..c691c4c789b 100644 --- a/gcc/testsuite/g++.dg/template/local6.C +++ b/gcc/testsuite/g++.dg/template/local6.C @@ -1,5 +1,5 @@ template <class T> struct PCVector2 -{ // { dg-message "candidates" } +{ // { dg-message "candidate is" } template <class T2> PCVector2(const PCVector2<T> &cv) ; PCVector2<T> operator- (const PCVector2<T> &ov) const diff --git a/gcc/testsuite/g++.dg/template/ptrmem4.C b/gcc/testsuite/g++.dg/template/ptrmem4.C index 0ea73a13106..b1422c3e811 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem4.C +++ b/gcc/testsuite/g++.dg/template/ptrmem4.C @@ -6,7 +6,7 @@ // Pointer to member function template argument deduction ICE. -template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "candidates" } +template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "candidate is" } struct SpyExample { diff --git a/gcc/testsuite/g++.dg/template/qualttp5.C b/gcc/testsuite/g++.dg/template/qualttp5.C index 7d1062e3a8f..fc93f462835 100644 --- a/gcc/testsuite/g++.dg/template/qualttp5.C +++ b/gcc/testsuite/g++.dg/template/qualttp5.C @@ -4,7 +4,7 @@ template <class U> struct A { - template <class T> class B {}; // { dg-message "candidates" } + template <class T> class B {}; // { dg-message "candidate is" } }; template <template <class> class TT> void f() diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C index deedfba75a2..3441ae5bed0 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C @@ -5,7 +5,7 @@ struct panama { panama(); panama(panama &); - panama& operator=(panama&); // { dg-message "candidates" } + panama& operator=(panama&); // { dg-message "candidate is" } }; extern panama dig(); diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C b/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C index 638ba9f9252..e77c437a6d0 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C @@ -38,7 +38,7 @@ struct bar class nnyacc { public: - static void assign(void*& lval, void*& rval); // { dg-message "candidates" } + static void assign(void*& lval, void*& rval); // { dg-message "candidate is" } }; void diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C index 92b04c4d02b..328bcdfe2ce 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C @@ -9,7 +9,7 @@ public: class Bar : public Foo { public: - int f (int); // { dg-message "candidates" } + int f (int); // { dg-message "candidate is" } }; int main () diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C index d832a4b47c1..7a1941cac4e 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C @@ -5,7 +5,7 @@ class B { public: - static void WantsNew (NewObject creator); // { dg-message "candidates" } + static void WantsNew (NewObject creator); // { dg-message "candidate is" } }; class A diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C index f1da7fba722..5038f23b16c 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C @@ -19,7 +19,7 @@ struct B { }; struct D : public B { - int f(struct B); // { dg-message "candidates" } referred to below + int f(struct B); // { dg-message "candidate is" } referred to below }; void h(D* pd) diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C index 78e46e1cd38..1e64693d804 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C @@ -14,7 +14,7 @@ public: class Something { public: - void DoSomething(Ding A); // { dg-message "candidates" } referred to + void DoSomething(Ding A); // { dg-message "candidate is" } referred to }; void DoSomething(Ding A); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C index d5763748f61..9e6ae0f6898 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C @@ -3,7 +3,7 @@ void f (char *); struct A { - void f (); // { dg-message "candidates" } referred to + void f (); // { dg-message "candidate is" } referred to }; struct B : public A { void g (char *); diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg11.C b/gcc/testsuite/g++.old-deja/g++.law/arg11.C index b6a0194f314..01331535ee2 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arg11.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arg11.C @@ -9,7 +9,7 @@ struct String { String(const char*); }; struct Ack { Ack(String); }; -struct S { void method(Ack); }; // { dg-message "candidates" } referenced below +struct S { void method(Ack); }; // { dg-message "candidate is" } referenced below void function(Ack); diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm9.C b/gcc/testsuite/g++.old-deja/g++.law/arm9.C index 7c7cfea0c8f..b8128c6f686 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arm9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arm9.C @@ -19,7 +19,7 @@ class B : public A { public: void set (f2 f); }; -void B::set (f2 f) { std::cout << "called B\n";} // { dg-message "candidates" } +void B::set (f2 f) { std::cout << "called B\n";} // { dg-message "candidate is" } int main() { B b; diff --git a/gcc/testsuite/g++.old-deja/g++.law/enum4.C b/gcc/testsuite/g++.old-deja/g++.law/enum4.C index 742f54bc459..37836595b2f 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/enum4.C +++ b/gcc/testsuite/g++.old-deja/g++.law/enum4.C @@ -11,7 +11,7 @@ enum Enum {enumerator1, enumerator2}; struct Struct { int i; - int getI(Enum) {return i;} // { dg-message "candidates" } + int getI(Enum) {return i;} // { dg-message "candidate is" } }; int funct (Enum) diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators9.C b/gcc/testsuite/g++.old-deja/g++.law/operators9.C index 8ec6825abfa..d00c707c915 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators9.C @@ -10,7 +10,7 @@ class B { public: operator=(B &); // { dg-error "no type" } - // { dg-message "candidates" "note" { target *-*-* } 12 } + // { dg-message "candidate is" "note" { target *-*-* } 12 } }; void diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C index 746a57ccfd6..e234d57c323 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C @@ -6,7 +6,7 @@ class data; class conatiner { public: virtual void* first (); - virtual data* contents (void* i); // { dg-message "candidates" } + virtual data* contents (void* i); // { dg-message "candidate is" } }; class user { diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p2431.C b/gcc/testsuite/g++.old-deja/g++.mike/p2431.C index 1d5b3974f9a..0bb2648215a 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p2431.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p2431.C @@ -3,7 +3,7 @@ class A { public: - A(A &); // { dg-message "candidates" } + A(A &); // { dg-message "candidate is" } }; class B diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p438.C b/gcc/testsuite/g++.old-deja/g++.mike/p438.C index a08a404aa91..16dc628b613 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p438.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p438.C @@ -12,7 +12,7 @@ class C class D { public: - void a(C& b); // { dg-message "candidates" } + void a(C& b); // { dg-message "candidate is" } }; void C::test() const diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p9068.C b/gcc/testsuite/g++.old-deja/g++.mike/p9068.C index aff4a6a7bc7..ff5454b2289 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p9068.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p9068.C @@ -2,7 +2,7 @@ // prms-id: 9068 struct ostream { - void operator<< (int); // { dg-message "candidates" } fn ref in err msg + void operator<< (int); // { dg-message "candidate is" } fn ref in err msg }; class C { diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t120.C b/gcc/testsuite/g++.old-deja/g++.niklas/t120.C index 17eaf0743fc..bef06655220 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t120.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t120.C @@ -3,4 +3,4 @@ typedef void (*T) (...); void f (); struct S { void g (T); void h() { g(f); } };// { dg-error "match" "match" } -// { dg-message "candidates" "note" { target *-*-* } 5 } +// { dg-message "candidate is" "note" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t121.C b/gcc/testsuite/g++.old-deja/g++.niklas/t121.C index cf3373964a2..4510a280312 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t121.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t121.C @@ -3,4 +3,4 @@ void f (); void g1 (void (*) (...)); void h1 () { g1 (f); }// { dg-error "invalid conversion" } struct S { void g2 (void (*) (...)); void h2 () { g2 (f); } };// { dg-error "match" "match" } -// { dg-message "candidates" "note" { target *-*-* } 5 } +// { dg-message "candidate is" "note" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash24.C b/gcc/testsuite/g++.old-deja/g++.other/crash24.C index 9d6af1dfe87..a49ce56b1aa 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/crash24.C +++ b/gcc/testsuite/g++.old-deja/g++.other/crash24.C @@ -7,7 +7,7 @@ class foo { friend class __iterator; typedef __iterator const_iterator; virtual ~foo() { } - __iterator begin(); // { dg-message "candidates" } + __iterator begin(); // { dg-message "candidate is" } }; static void iteratorTest(const foo &x) { diff --git a/gcc/testsuite/g++.old-deja/g++.other/expr1.C b/gcc/testsuite/g++.old-deja/g++.other/expr1.C index 1f1f60d19c2..485594dfbe3 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/expr1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/expr1.C @@ -3,7 +3,7 @@ // Simplified from bug report by Trevor Taylor <ttaylor@powerup.com.au> struct T { - int operator()(int) { } // { dg-message "candidates" } + int operator()(int) { } // { dg-message "candidate is" } }; int main() { diff --git a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C b/gcc/testsuite/g++.old-deja/g++.other/pmf3.C index d8568dd9b1b..f43ed65ef2a 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C +++ b/gcc/testsuite/g++.old-deja/g++.other/pmf3.C @@ -3,7 +3,7 @@ // Bug: g++ was crashing after giving errors. template<class T> - void connect_to_method( // { dg-message "candidates are" } + void connect_to_method( // { dg-message "candidate is" } T *receiver, void (T::*method)()) {} |