diff options
author | Jason Merrill <jason@redhat.com> | 2000-06-12 19:52:58 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-06-12 19:52:58 -0400 |
commit | 431f67e296b52f569c70e45cff71905257254589 (patch) | |
tree | 171072bd4aac7284cda7de41a127f2a8c2c54e5d /gcc | |
parent | c5588504703c907d00bf1424405aed0da645a27c (diff) | |
download | gcc-431f67e296b52f569c70e45cff71905257254589.zip gcc-431f67e296b52f569c70e45cff71905257254589.tar.gz gcc-431f67e296b52f569c70e45cff71905257254589.tar.bz2 |
update
From-SVN: r34509
Diffstat (limited to 'gcc')
52 files changed, 152 insertions, 69 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b549689..2f620c6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-06-12 Jason Merrill <jason@redhat.com> + + * 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 33c4b23..5e63b9f 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 <limits.h> + 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 c73557a..afc7060 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 <assert.h> + 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 7704b98..44f35c3 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 <complex> -typedef complex<double> Complex; +typedef std::complex<double> 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 707e898..4e500a1 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 aba1990..4eaf415 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 <limits.h> + 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 05de379..2499931 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 9101e9e..093abd1 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 f3bc843..7fecbaa 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 5a82107..667264a 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 1148e27..6fc0e4b 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<false, 0>; +#endif diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C index 3e2bf74..4cec694 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 <stdarg.h> diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning10.C b/gcc/testsuite/g++.old-deja/g++.jason/warning10.C index 8dbf5ed..04b923b 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 044249f..894bdec 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 <complex> -typedef complex<double> Complex; +typedef std::complex<double> Complex; #include <stdio.h> 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 15de4bc..08adac9 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<sizeof(int) * 8> bufWord; + std::bitset<sizeof(int) * 8> 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 835b426..9e37be8 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 178a0bb..1229795 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 8439c34..9a98545 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 <iostream.h> +#include <stdlib.h> #include <stddef.h> #include <new> 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 3944052..5af0724 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<class T, int i1, int i2> + template<class T, long i1, long i2> 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 cdd0dc5..06ebe3d5 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 65932d3..44299f2 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 def3411..18ce2d3 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 8284525..afeb153 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 2028593..de5e374 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 <aoliva@cygnus.com> -// 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 d5873f77..45e4478 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<T, U>::~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 5626174..337496a 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<int> x; // ERROR - jump crosses initialization + std::vector<int> 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 eb7794d..0ed4cf3 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 e6483ca..2784a28 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> -list<int*> li; +std::list<int*> 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 2097cfa..a5b540b 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 <map> #include <cstdlib> +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 6158f50..5672d72 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 c441196..ed9798b 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 070e885..89c8e80 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 03a6fe2..df770da 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<class T> 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 ff7bc5c..7d624ea 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<int, EdgeType > Successor; - typedef pair<VertexType, Successor> vertex; - typedef vector<vertex> GraphType; + typedef std::map<int, EdgeType > Successor; + typedef std::pair<VertexType, Successor> vertex; + typedef std::vector<vertex> GraphType; typedef typename GraphType::iterator iterator; typedef typename GraphType::const_iterator const_iterator; @@ -62,7 +62,7 @@ ostream& operator<<(ostream& os, Graph<VertexType,EdgeType>& G) int main() { // no edge weighting, therefore type Empty: - Graph<string, Empty> V(true); // ERROR - no bool constructor + Graph<std::string, Empty> 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 655aca9..f83b6c2 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 <vector> #include<string> +#include <iostream> 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 a39d0c5..3be9340 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 <functional> #include <algorithm> #include <cassert> +using namespace std; int main() { list<int> 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 0000000..e7d4272 --- /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 <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> +// Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de> +#include <list> +#include <functional> +#include <algorithm> +#include <cassert> +int main() +{ + std::list<int> l; + l.push_back(1); + l.push_back(2); + + std::list<int>::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<int>(), 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 5b6bc6a..a7f41593 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> -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 5ffdf9e..788d603 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 <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> // 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 0000000..2dc7a8b --- /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 <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> +// 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 0000000..e2b25f6 --- /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 <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> +// 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 b3468d9..c6bf670 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<connection_t> connections; +std::vector<connection_t> connections; /*----------------------------------------*/ diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C index 415e5bd..337e5a7 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 <vector> +using namespace std; template <typename T=float> 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 3c97e01..0bd69e3 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 <iterator.h> #include <string> -ostream_iterator<string> oo(cout); +ostream_iterator<std::string> 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 6609be8..2721d8f 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 7c0c153..395e838 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 <functional> #endif +using namespace std; + template<class R> 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 64ca71d..2229035 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 02646b2..b197e0e 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<int> l(5, 0); + std::vector<int> 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 94be7ec..b36c382 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 <iterator> +using namespace std; + template<size_t n, size_t i> struct PartialDotProduct { template<class T> 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 fc43aab..73c33ab 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 <T> tp; +std::vector <T> 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 8262b79..3e5ac2b 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 70b822a..73be7a7 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" } |