]> gcc.gnu.org Git - gcc.git/commitdiff
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 52d35b0462c5d1359ec62a487d239fd98ea72d8d..fe9e73b95fa1a605949cd63c531adb7348c6b903 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 89e8469f720e7e82e4c95da0d2fee9b09b05597d..b02603789a605fba4dc0c06121115f87711fc432 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 024670cf3472d0a3204a4f59c238cd8cb82e5a0f..6ba76d7fae31da574557e9c805cda641d805a3d0 100644 (file)
@@ -3,6 +3,7 @@
 int bar ()
 {
   throw 100;
+  return 0;
 }
 
 int main ()
index 617b355a6c696af4c0fecd0ce227b11b9b24cc8e..75bb614e5413384b4450efc5caf56aa6d50d84b8 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 ef5d4dbbc67c5fd74fff56f12e496aac53db7582..d8e9987a45ca1d8f0845af5f17ff9249ea682063 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 15e91fde7f786899b3566149d0e653f4e1624ec0..53fa3552856b41e04520b817259cbea279e091d0 100644 (file)
@@ -25,6 +25,7 @@ public:
     }
     IncludeIt& operator=(const IncludeIt& i) {
        myStrvec = i.myStrvec;
+       return *this;
     }
 private:
     CopyMe myStrvec;
index 6b51dd0521961f5d7b37e6845536ecc5fe772cef..b0d2d9ed65dd805b78e4886be758913c1161b0e6 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()
 {
This page took 0.078757 seconds and 5 git commands to generate.