fix noreturn warnings
authorJason Merrill <jason@gcc.gnu.org>
Wed, 25 Jul 2001 12:06:20 +0000 (08:06 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 25 Jul 2001 12:06:20 +0000 (08:06 -0400)
From-SVN: r44350

gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
gcc/testsuite/g++.old-deja/g++.eh/flow1.C
gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
gcc/testsuite/g++.old-deja/g++.jason/template31.C
gcc/testsuite/g++.old-deja/g++.jason/warning2.C

index 52d35b0..fe9e73b 100644 (file)
@@ -5,7 +5,7 @@ public:
   A(void) {}
 private:
   A(const A &) { abort(); } // ERROR - 
-  const A& operator =(const A &) { abort(); }
+  const A& operator =(const A &) { abort(); } // WARNING - no return stmt XFAIL *-*-*
 };
 
 class B : public A {
index 89e8469..b026037 100644 (file)
@@ -16,8 +16,8 @@ public:
 class dictionary
 {
 public:
-  void *lookup(symbol s, void *v=0) { win = 1; }
-  void *lookup(const char *) {}
+  void lookup(symbol s, void *v=0) { win = 1; }
+  void lookup(const char *) {}
 };
 
 int main()
index 024670c..6ba76d7 100644 (file)
@@ -3,6 +3,7 @@
 int bar ()
 {
   throw 100;
+  return 0;
 }
 
 int main ()
index 617b355..75bb614 100644 (file)
@@ -1,7 +1,7 @@
 // Test that unwinding properly restores SP.
 // Contributed by Jason Merrill <jason@cygnus.com>
 
-int f (int i)
+void f (int i)
 {
   throw i;
 }
index ef5d4db..d8e9987 100644 (file)
@@ -5,7 +5,7 @@
 
 struct A
 {
-  int  f(int a) { }
+  int  f(int a) { return 0; }
   void f(int a, int b) { }
 };
 
index 15e91fd..53fa355 100644 (file)
@@ -25,6 +25,7 @@ public:
     }
     IncludeIt& operator=(const IncludeIt& i) {
        myStrvec = i.myStrvec;
+       return *this;
     }
 private:
     CopyMe myStrvec;
index 6b51dd0..b0d2d9e 100644 (file)
@@ -2,10 +2,10 @@
 // Build don't link:
 
 struct A {
-  virtual int f () = 0;
+  virtual void f () = 0;
 };
 
-struct B: public A { int f () { } };
+struct B: public A { void f () { } };
 
 int main()
 {