update
authorJason Merrill <jason@redhat.com>
Mon, 12 Jun 2000 23:52:58 +0000 (19:52 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 12 Jun 2000 23:52:58 +0000 (19:52 -0400)
From-SVN: r34509

52 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C
gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C
gcc/testsuite/g++.old-deja/g++.brendan/crash20.C
gcc/testsuite/g++.old-deja/g++.brendan/crash30.C
gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C
gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
gcc/testsuite/g++.old-deja/g++.eh/ptr1.C
gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
gcc/testsuite/g++.old-deja/g++.jason/mangle3.C
gcc/testsuite/g++.old-deja/g++.jason/template31.C
gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
gcc/testsuite/g++.old-deja/g++.jason/warning10.C
gcc/testsuite/g++.old-deja/g++.law/operators4.C
gcc/testsuite/g++.old-deja/g++.martin/bitset1.C
gcc/testsuite/g++.old-deja/g++.martin/new1.C
gcc/testsuite/g++.old-deja/g++.mike/net42.C
gcc/testsuite/g++.old-deja/g++.mike/net46.C
gcc/testsuite/g++.old-deja/g++.mike/ns15.C
gcc/testsuite/g++.old-deja/g++.oliva/delete2.C
gcc/testsuite/g++.old-deja/g++.oliva/delete3.C
gcc/testsuite/g++.old-deja/g++.oliva/delete4.C
gcc/testsuite/g++.old-deja/g++.oliva/delete5.C
gcc/testsuite/g++.old-deja/g++.oliva/expr2.C
gcc/testsuite/g++.old-deja/g++.other/delete3.C
gcc/testsuite/g++.old-deja/g++.other/init9.C
gcc/testsuite/g++.old-deja/g++.other/inline2.C
gcc/testsuite/g++.old-deja/g++.other/inline7.C
gcc/testsuite/g++.old-deja/g++.other/inline8.C
gcc/testsuite/g++.old-deja/g++.other/static8.C
gcc/testsuite/g++.old-deja/g++.other/temporary1.C
gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C
gcc/testsuite/g++.old-deja/g++.pt/static3.C
gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
gcc/testsuite/g++.old-deja/g++.robertl/eb127.C
gcc/testsuite/g++.old-deja/g++.robertl/eb129.C
gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.robertl/eb132.C
gcc/testsuite/g++.old-deja/g++.robertl/eb133.C
gcc/testsuite/g++.old-deja/g++.robertl/eb133a.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.robertl/eb133b.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.robertl/eb21.C
gcc/testsuite/g++.old-deja/g++.robertl/eb36.C
gcc/testsuite/g++.old-deja/g++.robertl/eb41.C
gcc/testsuite/g++.old-deja/g++.robertl/eb5.C
gcc/testsuite/g++.old-deja/g++.robertl/eb59.C
gcc/testsuite/g++.old-deja/g++.robertl/eb60.C
gcc/testsuite/g++.old-deja/g++.robertl/eb62.C
gcc/testsuite/g++.old-deja/g++.robertl/eb65.C
gcc/testsuite/g++.old-deja/g++.robertl/eb7.C
gcc/testsuite/g++.old-deja/g++.robertl/eb91.C
gcc/testsuite/g++.old-deja/old-deja.exp

index b5496896ee52343bfae3e8266fc68f00b266da94..2f620c624a6234f1ec1e2d800809ec37a123ca1d 100644 (file)
@@ -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.
index 33c4b23963edb4eed8a28fe48ae4e4e48ee2f731..5e63b9fb808af0c66daa683f6b4599f1c6ea4767 100644 (file)
@@ -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 );
   
index c73557ae6578a413d41ac5af8f2a7ad9c2060288..afc7060195046dcee6f21b8361d7db3048e3c141 100644 (file)
@@ -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;
 }
index 7704b98ebd2e029fa407f88741c4d0161b4f9f41..44f35c381cfa74c90389802d20fdf25f8c7bfac0 100644 (file)
@@ -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()
 {
index 707e89841ff7847943e7321e06d0d0d8f2c16d0e..4e500a15a6a73b9d83be96114c1a3c2aae8695f5 100644 (file)
@@ -5,6 +5,6 @@
 int
 main(void) {
 
-  string a[] = {"Hello"};
+  std::string a[] = {"Hello"};
 
 }
index aba1990cdbfc9e3a4dc172074dbcfa0c6c7948bc..4eaf41503d1e4e64300a6dadf6e1966e5bc6e29a 100644 (file)
 
 // 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; }
index 05de379e2b4ca28ec1198f61bb9862d5e0fde242..2499931589b910733b9d83d668802c234d657da3 100644 (file)
@@ -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;
index 9101e9e3010a6a0f82208138e76194085fb388d2..093abd1425a321e3e9c6dadea2c7100440820f8a 100644 (file)
@@ -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;
 }
index f3bc8433fc8c0a32a7a940855cfedddd2a105285..7fecbaa6e2a0a39e2bc6ff860a9071596a3b25af 100644 (file)
@@ -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")));
index 5a82107bfef8424bc9f0920a8d0804643e17e71b..667264a53eacc7fb652212664cd565c494c19665 100644 (file)
@@ -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;
 }
index 1148e278da2560bd07d2b64648b686c8e3306381..6fc0e4b5eca887c9c1bcf8c8ea0041dcaaa89f73 100644 (file)
@@ -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
index 3e2bf74469fca9b6587d371de2422049520de8c9..4cec6948a312277376f86d2e94b4321fae7c8a36 100644 (file)
@@ -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>
 
index 8dbf5ed321796b2c1f26c18f1a98d49d7eec54ae..04b923b6a9b22be6c62ad363e78b9aa41a88abc2 100644 (file)
@@ -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)
index 044249fa8b74e5d8a5e41d1a5c4bc955a97405e4..894bdec3129c7ba9a3a932e7b59474a1e2b4c2be 100644 (file)
@@ -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 {
index 15de4bcf6f0ebdabddfaba19bb92e862662b60f7..08adac9129d47df1109152239f2f6691ddf1f4ca 100644 (file)
@@ -3,7 +3,7 @@
 
 int main()
 {
-  bitset<sizeof(int) * 8> bufWord;
+  std::bitset<sizeof(int) * 8> bufWord;
 
   bufWord[3] = 0;
 }
index 835b42659b8aba8d7113309626f7164a35b3624c..9e37be8d154acb6966ef61688f41963e2740d92f 100644 (file)
@@ -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){
index 178a0bbf5ec29ebbd773cc6fbc03ef2eca491716..1229795cd190a75ee559a289ae2ebf0c1f31381e 100644 (file)
@@ -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;
index 8439c34c3c24e54f104859cd370f73cd17c5f238..9a985450a4accce758ae6a64c19c93711365e6d8 100644 (file)
@@ -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;
 }
index 394405261906cefbd1d61343cb1da5c21e24db47..5af072444766a4781933826879f1471bf2477986 100644 (file)
@@ -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);
   }
index cdd0dc566a0aad21039dc30acd0d0601515941c6..06ebe3d52a3619bcdb634bb91681882e5d1424f2 100644 (file)
@@ -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();
 }
 
 
index 65932d35e75a2f273aa223446452d070f742823a..44299f2c9b7d2cf6b0173f0772e6f64951aa18e0 100644 (file)
@@ -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();
 }
 
 
index def34112273871003af62eaed8da6c87ad849870..18ce2d3c3c17bb221b9e3b53aa811a626f0fd6c7 100644 (file)
@@ -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();
 }
 
 
index 8284525abe57fe2a6d75702d184cbf6cf05645ba..afeb153ffcbdf900c39380a4e74773f9fde84786 100644 (file)
@@ -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();
 }
 
 
index 20285937b78e2f446b6b96efb7c96b3a4b49b15c..de5e374d4b8701de91f632ee80a827ddcf3f20da 100644 (file)
@@ -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);
 }
index d5873f77be2f5cdc49bd0d3c36758b78f8c1954b..45e447859f56d36d889690392c878739ee1a335a 100644 (file)
@@ -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);
index 5626174bbe4dd92881796cf8836d360780e01fa4..337496a8bfffdd2d7f369957c432d0fd2f507868 100644 (file)
@@ -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
   ;
 }
index eb7794d1ed217ed2d3ae517ef6b2bfb357139a2b..0ed4cf3d9234789d3ebc8967d19277c6b0592216 100644 (file)
@@ -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;
 }
index e6483ca6402fe6654934f746337df8997dd3047a..2784a28676ea68c8c0a383aa1d5f4d88a2d0021e 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <list>
 
-list<int*> li;
+std::list<int*> li;
 
 void f ()
 {
index 2097cfaa9f81ed227b89628731b8cba2247ccfba..a5b540bcf724150949077db46105b2d8b00ad7b4 100644 (file)
@@ -4,6 +4,8 @@
 #include <map>
 #include <cstdlib>
 
+using namespace std;
+
 class NAMES_ITEM
     {
 public:
index 6158f50299d04e28bdc3bbb5d5b5130783f3e1a2..5672d728be8bbb4e68d1c048253344f4f42e426f 100644 (file)
@@ -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
index c441196eab0f84a4f6c6678c0aa0a3178b798020..ed9798b5b82c77c8691e69ea2d48bf0b09e65f93 100644 (file)
@@ -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 *)
index 070e885fe91a58908fc77a0d0569f4d2af4b15dd..89c8e80dd579624f1f07ddc25ea3dd6d800c8f7e 100644 (file)
@@ -7,7 +7,7 @@ struct S {
 };
 
 void f(S s);
-void f(type_info);
+void f(std::type_info);
 
 void g()
 {
index 03a6fe213b4ae33bcdc03634eb35b9948e2c9bc6..df770dac87d2a76c8c9ea6dc5ce4783461a37e0e 100644 (file)
@@ -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 {
index ff7bc5c6c7eb8052864cfb5387d20797a267dcd9..7d624eae14d1bdd619f07b9faf089e52747082c9 100644 (file)
@@ -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
index 655aca9bc86cf91936abe0ce968c930302782bcd..f83b6c2cc472aeb45c65b26809636d5281985da0 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <vector>
 #include<string>
+#include <iostream>
 
 using namespace std;
 
index a39d0c5b4cb88043200f27a42990800d80f63198..3be93405ff8cc210b1d38e0a76f48a156923e091 100644 (file)
@@ -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 (file)
index 0000000..e7d4272
--- /dev/null
@@ -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 );
+}
+
index 5b6bc6a5842b828b7e73f362ca72d98ae080d809..a7f4159392d5eed546eabf00b0b23c51c07c52d2 100644 (file)
 
 #include <string>
 
-string foo();
+std::string foo();
 struct a {
        void bar();
        enum b { c, d };
        b theb;
-       string baz;
+       std::string baz;
 };
 
 void
index 5ffdf9e6afea026d5fff8aa482dc93391918b45c..788d60388cca1bd42c180fde42720f08dd555e82 100644 (file)
@@ -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 (file)
index 0000000..2dc7a8b
--- /dev/null
@@ -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 (file)
index 0000000..e2b25f6
--- /dev/null
@@ -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;
+}
+
+       
index b3468d9e82f94f9120fbb82a6ee0c69eb6a9d4d6..c6bf6705f9f3fd36a7cac1ca684c2deb8b13580d 100644 (file)
@@ -8,7 +8,7 @@ struct connection_t {
   connection_t() {}
 };
 
-vector<connection_t> connections;
+std::vector<connection_t> connections;
 
 /*----------------------------------------*/
 
index 415e5bdf6f495b8b5a2fd88f57b95f4a75f46d73..337e5a72e595425bf4c48c18266d690bf6983a8a 100644 (file)
@@ -1,4 +1,5 @@
 #include <vector>
+using namespace std;
 
 template <typename T=float> class foo {
 public:
index 3c97e01844e3ef99e7330d94e50a2bf5452ff370..0bd69e376487c776045cdffe5801634ca25abcf3 100644 (file)
@@ -2,7 +2,7 @@
 #include <iterator.h>
 #include <string>
 
-ostream_iterator<string> oo(cout);
+ostream_iterator<std::string> oo(cout);
 
 int main()
 {
index 6609be8c0ddd1317847ce800eb05be4f9e66c695..2721d8f3caaa4a2b1745c4feb44f376f965e92bb 100644 (file)
@@ -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
index 7c0c1534ae49de409909494b86afe6aee63383fe..395e8385aeea1d781eecfbcc69ffb26f3790726f 100644 (file)
@@ -7,6 +7,8 @@
 #include <functional>
 #endif
 
+using namespace std;
+
 template<class R> int p( int val, R& r )
 {
    return val + r;
index 64ca71d96069f3676d74a097905438dff42c5652..22290353d9484f542a5d435eff22e5b387c2ef35 100644 (file)
@@ -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_;
 };
 
index 02646b2fb8a628da909f9d7640ecf40c925a6c7c..b197e0e832c15442138528fffbc9210ac54f5408 100644 (file)
@@ -3,5 +3,5 @@
 
 void f(void)
 {
-  vector<int> l(5, 0);
+  std::vector<int> l(5, 0);
 }
index 94be7ecbdb7ce4d608f6decce8150102bd2b6d6f..b36c3821393d3b1366ae306355374da308948f52 100644 (file)
@@ -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(); }
index fc43aab4179486a88e7027e13ebd1ad4eb819a86..73c33ab48d29bb8a809270cb0ae68893e9c4598d 100644 (file)
@@ -8,7 +8,7 @@ class T
 
 };
 
-vector <T> tp;
+std::vector <T> tp;
 
 void f()
 {
index 8262b7939e16377e0a9d4a20aff35ade71d75966..3e5ac2b505c6d900e5a1e0ae1bd0b1f4c2420203 100644 (file)
@@ -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:
index 70b822abc80f9908c360f623d750759c73bc0189..73be7a71ae3a3aa2ec6ca9dd1f5be730a9df6c8c 100644 (file)
@@ -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"
 
 }