From: Jason Merrill Date: Mon, 12 Jun 2000 23:52:58 +0000 (-0400) Subject: update X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=431f67e296b52f569c70e45cff71905257254589;p=gcc.git update From-SVN: r34509 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b5496896ee5..2f620c624a6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-06-12 Jason Merrill + + * g++.old-deja/old-deja.exp: Add -Wno-long-long. + Fri Jun 9 22:46:34 2000 Jeffrey A Law (law@cygnus.com) * gcc.c-torture/compile/20000609-1.c: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C index 33c4b23963e..5e63b9fb808 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C @@ -4,13 +4,19 @@ // Special g++ Options: -Wsign-promo // this test may only be valid for 32bit targets at present +#include + enum e_i { vali } enum_int; enum e_ui { +#if INT_MAX == 32767 + valui = 0xF234 +#else valui = 0xF2345678 +#endif } enum_uint; @@ -25,8 +31,8 @@ struct caracas { int main () { - caracas obj_ei ( enum_int ); // WARNING - // WARNING - - caracas obj_eui ( enum_uint ); // WARNING - // WARNING - + caracas obj_ei ( enum_int ); // WARNING - + caracas obj_eui ( enum_uint ); // WARNING - caracas obj_i ( i ); caracas obj_ui ( ui ); diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C b/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C index c73557ae657..afc70601950 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C @@ -2,6 +2,7 @@ //test for bools with inclusive ors #include + void bar ( bool x ) {}; void bars ( short x ) {}; @@ -51,7 +52,6 @@ int orus(){ return blob; //expect 65539, will be 3 if done in us type } - int main() { int tmp; #if 0 @@ -66,8 +66,11 @@ int main() { assert (tmp ==27); tmp = ors(); assert (tmp ==27); - tmp = orus(); - assert (tmp == 65539); + if (sizeof (int) > 2 && sizeof (int) > sizeof (unsigned short)) + { + tmp = orus(); + assert (tmp == 65539); + } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C index 7704b98ebd2..44f35c381cf 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C @@ -1,7 +1,7 @@ // Build don't link: // GROUPS passed old-abort #include -typedef complex Complex; +typedef std::complex Complex; Complex ComputeVVself() { diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C index 707e89841ff..4e500a15a6a 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C @@ -5,6 +5,6 @@ int main(void) { - string a[] = {"Hello"}; + std::string a[] = {"Hello"}; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C index aba1990cdbf..4eaf41503d1 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C @@ -30,9 +30,13 @@ // Special g++ Options: +#include + int main (); +#if INT_MAX > 32767 short s = (short) &main; // WARNING - small integer +#endif char c = (char) &main; // WARNING - small integer int main () { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C index 05de379e2b4..2499931589b 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C @@ -3,13 +3,13 @@ // Check we can throw a bad_alloc exception when malloc dies -static __SIZE_TYPE__ arena[100000]; // so things can initialize +static __SIZE_TYPE__ arena[32767]; // so things can initialize static int fail; static unsigned pos; extern "C" void *malloc (__SIZE_TYPE__ size) { - unsigned *p = &arena[pos]; + __SIZE_TYPE__ *p = &arena[pos]; if (fail) return 0; diff --git a/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C b/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C index 9101e9e3010..093abd1425a 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C @@ -15,8 +15,8 @@ int main() } catch (E *&e) { - printf ("address of e is 0x%lx\n", (long)e); - return !(long(e) != 5 && e->x == 5); + printf ("address of e is 0x%lx\n", (__SIZE_TYPE__)e); + return !((__SIZE_TYPE__)e != 5 && e->x == 5); } return 2; } diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C index f3bc8433fc8..7fecbaa6e2a 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C @@ -1,5 +1,5 @@ // Test that attributes weak and alias coexist. -// excess errors test - XFAIL alpha*-dec-osf* +// excess errors test - XFAIL alpha*-dec-osf* *-hms extern "C" { void f () __attribute__((weak, alias ("_f"))); diff --git a/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C b/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C index 5a82107bfef..667264a53ea 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C @@ -3,17 +3,17 @@ int main() { - char ArrA[10][10][20][30], - ArrB[10][10][20][30]; + char ArrA[1][1][2][3], + ArrB[1][1][2][3]; - void HitMe(char [10][10][20][30], char [10][10][20][30]); + void HitMe(char [1][1][2][3], char [1][1][2][3]); HitMe(ArrA, ArrB); return 0; } -void HitMe(char A[10][10][20][30], char B[10][10][20][30]) +void HitMe(char A[1][1][2][3], char B[1][1][2][3]) { return; } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template31.C b/gcc/testsuite/g++.old-deja/g++.jason/template31.C index 1148e278da2..6fc0e4b5eca 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/template31.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/template31.C @@ -37,4 +37,6 @@ int main(int argc, char**argv) { } template class std::__malloc_alloc_template<0>; +#ifndef __USE_MALLOC template class std::__default_alloc_template; +#endif diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C index 3e2bf74469f..4cec6948a31 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C @@ -3,7 +3,7 @@ // support, because it doesn't support variadic functions. // Special g++ Options: -fvtable-thunks -// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3 mn10300-*-* mn10200-*-* v850-*-* sh-*-* +// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3 mn10300-*-* mn10200-*-* v850-*-* sh-*-* h8* #include diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning10.C b/gcc/testsuite/g++.old-deja/g++.jason/warning10.C index 8dbf5ed3217..04b923b6a9b 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning10.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/warning10.C @@ -3,7 +3,7 @@ // Special g++ Options: -W -Wall struct A { - unsigned int b : 28; + unsigned int b : 14; }; int f (int i, unsigned char u, A a, unsigned long ul) diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators4.C b/gcc/testsuite/g++.old-deja/g++.law/operators4.C index 044249fa8b7..894bdec3129 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators4.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators4.C @@ -6,7 +6,7 @@ // Message-ID: <92Sep3.220137edt.30@jarvis.csri.toronto.edu> #include -typedef complex Complex; +typedef std::complex Complex; #include class Vector { diff --git a/gcc/testsuite/g++.old-deja/g++.martin/bitset1.C b/gcc/testsuite/g++.old-deja/g++.martin/bitset1.C index 15de4bcf6f0..08adac9129d 100644 --- a/gcc/testsuite/g++.old-deja/g++.martin/bitset1.C +++ b/gcc/testsuite/g++.old-deja/g++.martin/bitset1.C @@ -3,7 +3,7 @@ int main() { - bitset bufWord; + std::bitset bufWord; bufWord[3] = 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.martin/new1.C b/gcc/testsuite/g++.old-deja/g++.martin/new1.C index 835b42659b8..9e37be8d154 100644 --- a/gcc/testsuite/g++.old-deja/g++.martin/new1.C +++ b/gcc/testsuite/g++.old-deja/g++.martin/new1.C @@ -28,7 +28,7 @@ struct line_error{ line_error(int i):line(i){} }; -#define CHECK(cond) if(!(cond))throw std::line_error(__LINE__); +#define CHECK(cond) if(!(cond))throw line_error(__LINE__); struct A{ A(int){ diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net42.C b/gcc/testsuite/g++.old-deja/g++.mike/net42.C index 178a0bbf5ec..1229795cd19 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net42.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net42.C @@ -16,7 +16,7 @@ get_stat() { unsigned long bit = 1; unsigned long sigignore = 0; int i = 0; - switch((unsigned long) (*p)->sigaction[i].sa_handler) + switch((__SIZE_TYPE__) (*p)->sigaction[i].sa_handler) { case 1: sigignore |= bit; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net46.C b/gcc/testsuite/g++.old-deja/g++.mike/net46.C index 8439c34c3c2..9a985450a4a 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net46.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net46.C @@ -1,16 +1,21 @@ #include +#include #include #include int fail = 1; +int in_main = 0; + void *operator new(size_t size) throw (std::bad_alloc) { + if (!in_main) return malloc (size); --fail; return (void*) 0; } int main() { cout << ""; + in_main = 1; new int; return fail; } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns15.C b/gcc/testsuite/g++.old-deja/g++.mike/ns15.C index 39440526190..5af07244476 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/ns15.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/ns15.C @@ -17,7 +17,7 @@ int cmp_d(const R* a, const R* b) { } namespace CXX { - template + template inline void qsort (T b[i1][i2], int (*cmp)(const T*, const T*)) { ::qsort ((void*)b, i1*i2, sizeof(T), (int (*)(const void *, const void *))cmp); } diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/delete2.C b/gcc/testsuite/g++.old-deja/g++.oliva/delete2.C index cdd0dc566a0..06ebe3d52a3 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/delete2.C +++ b/gcc/testsuite/g++.old-deja/g++.oliva/delete2.C @@ -10,7 +10,7 @@ extern "C" void exit(int); struct Foo { ~Foo() { - std::exit(0); + exit(0); } }; @@ -19,7 +19,7 @@ struct Bar : virtual Foo { int main() { delete [] new Bar[1]; - std::abort(); + abort(); } diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/delete3.C b/gcc/testsuite/g++.old-deja/g++.oliva/delete3.C index 65932d35e75..44299f2c9b7 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/delete3.C +++ b/gcc/testsuite/g++.old-deja/g++.oliva/delete3.C @@ -19,7 +19,7 @@ struct Foo { } ~Foo() { - std::exit(0); + exit(0); } }; @@ -30,7 +30,7 @@ struct Bar : virtual Foo { int main() { delete [] new Bar[2]; - std::abort(); + abort(); } diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/delete4.C b/gcc/testsuite/g++.old-deja/g++.oliva/delete4.C index def34112273..18ce2d3c3c1 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/delete4.C +++ b/gcc/testsuite/g++.old-deja/g++.oliva/delete4.C @@ -10,7 +10,7 @@ extern "C" void exit(int); struct Foo { ~Foo() { - std::exit(0); + exit(0); } }; @@ -23,7 +23,7 @@ struct Baz { int main() { Baz(); - std::abort(); + abort(); } diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/delete5.C b/gcc/testsuite/g++.old-deja/g++.oliva/delete5.C index 8284525abe5..afeb153ffcb 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/delete5.C +++ b/gcc/testsuite/g++.old-deja/g++.oliva/delete5.C @@ -10,7 +10,7 @@ extern "C" void exit(int); struct Foo { ~Foo() { - std::exit(0); + exit(0); } }; @@ -23,7 +23,7 @@ void foo() { int main() { foo(); - std::abort(); + abort(); } diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/expr2.C b/gcc/testsuite/g++.old-deja/g++.oliva/expr2.C index 20285937b78..de5e374d4b8 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/expr2.C +++ b/gcc/testsuite/g++.old-deja/g++.oliva/expr2.C @@ -2,11 +2,6 @@ // by Alexandre Oliva -// execution test - XFAIL *-*-* - -extern "C" void abort (void); -extern "C" void exit (int); - int i, j; const int &f(const int& I, const int& J) { @@ -15,7 +10,5 @@ const int &f(const int& I, const int& J) { } int main () { - if (&f(i, j) != &j) - abort (); - exit (0); + return (&f(i, j) != &j); } diff --git a/gcc/testsuite/g++.old-deja/g++.other/delete3.C b/gcc/testsuite/g++.old-deja/g++.other/delete3.C index d5873f77be2..45e447859f5 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/delete3.C +++ b/gcc/testsuite/g++.old-deja/g++.other/delete3.C @@ -15,12 +15,12 @@ map::~map () struct SomeClass { }; -void* operator new(size_t numBytes, SomeClass&, const nothrow_t&) throw() +void* operator new(size_t numBytes, SomeClass&, const std::nothrow_t&) throw() { - return operator new(numBytes, nothrow); + return operator new(numBytes, std::nothrow); } -void operator delete(void* pMemory, SomeClass&, const nothrow_t&) throw() +void operator delete(void* pMemory, SomeClass&, const std::nothrow_t&) throw() { i = 7; return operator delete(pMemory); diff --git a/gcc/testsuite/g++.old-deja/g++.other/init9.C b/gcc/testsuite/g++.old-deja/g++.other/init9.C index 5626174bbe4..337496a8bff 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/init9.C +++ b/gcc/testsuite/g++.old-deja/g++.other/init9.C @@ -34,7 +34,7 @@ void b() { void c() { goto bar; // ERROR - jump from here - vector x; // ERROR - jump crosses initialization + std::vector x; // ERROR - jump crosses initialization bar: // ERROR - jump to here ; } diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline2.C b/gcc/testsuite/g++.old-deja/g++.other/inline2.C index eb7794d1ed2..0ed4cf3d923 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/inline2.C +++ b/gcc/testsuite/g++.old-deja/g++.other/inline2.C @@ -7,5 +7,5 @@ int main() { double foo = 4.5; - if (abs (0.5-abs (foo-0.5)) < 1e-10) foo+=1; + if (std::abs (0.5-std::abs (foo-0.5)) < 1e-10) foo+=1; } diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline7.C b/gcc/testsuite/g++.old-deja/g++.other/inline7.C index e6483ca6402..2784a28676e 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/inline7.C +++ b/gcc/testsuite/g++.old-deja/g++.other/inline7.C @@ -3,7 +3,7 @@ #include -list li; +std::list li; void f () { diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline8.C b/gcc/testsuite/g++.old-deja/g++.other/inline8.C index 2097cfaa9f8..a5b540bcf72 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/inline8.C +++ b/gcc/testsuite/g++.old-deja/g++.other/inline8.C @@ -4,6 +4,8 @@ #include #include +using namespace std; + class NAMES_ITEM { public: diff --git a/gcc/testsuite/g++.old-deja/g++.other/static8.C b/gcc/testsuite/g++.old-deja/g++.other/static8.C index 6158f50299d..5672d728be8 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/static8.C +++ b/gcc/testsuite/g++.old-deja/g++.other/static8.C @@ -8,6 +8,6 @@ #define NAME(OLD, NEW) NEW #endif /* (!defined (__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100) */ -static unsigned int strlen (const char*) {} // ERROR - previous declaration +static unsigned int strlen (const char*) {return 0;} // ERROR - previous declaration int NAME (strlen__FPCc, _Z6strlenPKc) = 0; // ERROR - duplicate declaration diff --git a/gcc/testsuite/g++.old-deja/g++.other/temporary1.C b/gcc/testsuite/g++.old-deja/g++.other/temporary1.C index c441196eab0..ed9798b5b82 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/temporary1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/temporary1.C @@ -4,16 +4,16 @@ int c, d; class Foo { public: - Foo() { printf("Foo() 0x%08lx\n", (unsigned long)this); ++c; } - Foo(Foo const &) { printf("Foo(Foo const &) 0x%08lx\n", (unsigned long)this); } - ~Foo() { printf("~Foo() 0x%08lx\n", (unsigned long)this); ++d; } + Foo() { printf("Foo() 0x%08lx\n", (__SIZE_TYPE__)this); ++c; } + Foo(Foo const &) { printf("Foo(Foo const &) 0x%08lx\n", (__SIZE_TYPE__)this); } + ~Foo() { printf("~Foo() 0x%08lx\n", (__SIZE_TYPE__)this); ++d; } }; // Bar creates constructs a temporary Foo() as a default class Bar { public: - Bar(Foo const & = Foo()) { printf("Bar(Foo const &) 0x%08lx\n", (unsigned long)this); } + Bar(Foo const & = Foo()) { printf("Bar(Foo const &) 0x%08lx\n", (__SIZE_TYPE__)this); } }; void fakeRef(Bar *) diff --git a/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C b/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C index 070e885fe91..89c8e80dd57 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C @@ -7,7 +7,7 @@ struct S { }; void f(S s); -void f(type_info); +void f(std::type_info); void g() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static3.C b/gcc/testsuite/g++.old-deja/g++.pt/static3.C index 03a6fe213b4..df770dac87d 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/static3.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/static3.C @@ -1,6 +1,6 @@ // On targets that don't support weak symbols, we require an explicit // instantiation of arr. -// excess errors test - XFAIL *-*-aout *-*-coff *-*-hpux* alpha*-dec-osf* +// excess errors test - XFAIL *-*-aout *-*-coff *-*-hpux* alpha*-dec-osf* *-*-hms template struct A { diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C index ff7bc5c6c7e..7d624eae14d 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C @@ -20,9 +20,9 @@ class Graph { // ERROR - candidates public: // public type interface - typedef map Successor; - typedef pair vertex; - typedef vector GraphType; + typedef std::map Successor; + typedef std::pair vertex; + typedef std::vector GraphType; typedef typename GraphType::iterator iterator; typedef typename GraphType::const_iterator const_iterator; @@ -62,7 +62,7 @@ ostream& operator<<(ostream& os, Graph& G) int main() { // no edge weighting, therefore type Empty: - Graph V(true); // ERROR - no bool constructor + Graph V(true); // ERROR - no bool constructor // ReadGraph(V, "gra1.dat"); // display of vertices with successors diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C index 655aca9bc86..f83b6c2cc47 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C @@ -2,6 +2,7 @@ #include #include +#include using namespace std; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C index a39d0c5b4cb..3be93405ff8 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C @@ -6,6 +6,7 @@ #include #include #include +using namespace std; int main() { list l; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C new file mode 100644 index 00000000000..e7d427225a4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C @@ -0,0 +1,22 @@ +// Build don't link: +// Gives ICE on EGCS release branch as of 98/06/08 on i686-pc-linux-gnulibc1) +// From: Klaus-Georg Adams +// Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de> +#include +#include +#include +#include +int main() +{ + std::list l; + l.push_back(1); + l.push_back(2); + + std::list::iterator it = + std::find_if( l.begin(), l.end(), + // This is a typo, it should be bind2nd, but an + // ICE is not a very helpful diagnostic! + std::binder2nd( std::equal_to(), 2 ) ); // ERROR - + assert( *(it) == 2 ); +} + diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C index 5b6bc6a5842..a7f4159392d 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C @@ -11,12 +11,12 @@ #include -string foo(); +std::string foo(); struct a { void bar(); enum b { c, d }; b theb; - string baz; + std::string baz; }; void diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb133.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb133.C index 5ffdf9e6afe..788d60388cc 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb133.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb133.C @@ -1,4 +1,5 @@ // Build don't link: +// Special g++ Options: -fno-honor-std // Gives ICE 109 // From: Klaus-Georg Adams // Reported against EGCS snaps 98/06/28. diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb133a.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb133a.C new file mode 100644 index 00000000000..2dc7a8b18d9 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb133a.C @@ -0,0 +1,16 @@ +// Build don't link: +// Gives ICE 109 +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. + +int main() +{ + try { + } + catch (std::bad_alloc) { // ERROR - parse error + return 1; + } + return 0; +} + + diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb133b.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb133b.C new file mode 100644 index 00000000000..e2b25f6ef08 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb133b.C @@ -0,0 +1,18 @@ +// Build don't link: +// Gives ICE 109 +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. + +using namespace std; + +int main() +{ + try { + } + catch (bad_alloc) { // ERROR - parse error + return 1; + } + return 0; +} + + diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C index b3468d9e82f..c6bf6705f9f 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C @@ -8,7 +8,7 @@ struct connection_t { connection_t() {} }; -vector connections; +std::vector connections; /*----------------------------------------*/ diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C index 415e5bdf6f4..337e5a72e59 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C @@ -1,4 +1,5 @@ #include +using namespace std; template class foo { public: diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C index 3c97e01844e..0bd69e37648 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C @@ -2,7 +2,7 @@ #include #include -ostream_iterator oo(cout); +ostream_iterator oo(cout); int main() { diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb5.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb5.C index 6609be8c0dd..2721d8f3caa 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb5.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb5.C @@ -3,7 +3,7 @@ enum { a, b }; class Bug { int pri:8; - int flags:24; + int flags:15; public: void bug() { flags |= a; // this does not work diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C index 7c0c1534ae4..395e8385aee 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C @@ -7,6 +7,8 @@ #include #endif +using namespace std; + template int p( int val, R& r ) { return val + r; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C index 64ca71d9606..22290353d94 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C @@ -3,8 +3,8 @@ class t { public: - t(const string& s) : s_(s) {} - string s_; + t(const std::string& s) : s_(s) {} + std::string s_; static t* t_; }; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C index 02646b2fb8a..b197e0e832c 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C @@ -3,5 +3,5 @@ void f(void) { - vector l(5, 0); + std::vector l(5, 0); } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb65.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb65.C index 94be7ecbdb7..b36c3821393 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb65.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb65.C @@ -1,5 +1,7 @@ #include +using namespace std; + template struct PartialDotProduct { template static T Expand(T* a, T* b) { return T(); } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C index fc43aab4179..73c33ab48d2 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C @@ -8,7 +8,7 @@ class T }; -vector tp; +std::vector tp; void f() { diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb91.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb91.C index 8262b7939e1..3e5ac2b505c 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb91.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb91.C @@ -20,7 +20,7 @@ private: _eb91_u_int8_t c[2]; } val; val.i = x; - swap(val.c[0], val.c[1]); + std::swap(val.c[0], val.c[1]); return val.i; }; @@ -31,7 +31,7 @@ private: _eb91_int8_t c[2]; } val; val.i = x; - swap(val.c[0], val.c[1]); + std::swap(val.c[0], val.c[1]); return val.i; }; public: diff --git a/gcc/testsuite/g++.old-deja/old-deja.exp b/gcc/testsuite/g++.old-deja/old-deja.exp index 70b822abc80..73be7a71ae3 100644 --- a/gcc/testsuite/g++.old-deja/old-deja.exp +++ b/gcc/testsuite/g++.old-deja/old-deja.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 90, 91, 92, 1994, 1997 Free Software Foundation, Inc. +# Copyright (C) 1988, 90, 91, 92, 1994, 1997, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ load_lib g++.exp # When a testcase doesn't have any special options, use these. if ![info exists DEFAULT_CXXFLAGS] { - set DEFAULT_CXXFLAGS "-ansi -pedantic-errors" + set DEFAULT_CXXFLAGS "-ansi -pedantic-errors -Wno-long-long" }