aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2001-07-25 08:06:20 -0400
committerJason Merrill <jason@gcc.gnu.org>2001-07-25 08:06:20 -0400
commita89dd0729b538e7c47760f1c003d9890560dc87f (patch)
tree63488cca914ea4f682ff763bc514fb08ad0a9a1f /gcc
parent31d8a3ac1c0e90b03d971a47057d3c1da9f1bf03 (diff)
downloadgcc-a89dd0729b538e7c47760f1c003d9890560dc87f.zip
gcc-a89dd0729b538e7c47760f1c003d9890560dc87f.tar.gz
gcc-a89dd0729b538e7c47760f1c003d9890560dc87f.tar.bz2
fix noreturn warnings
From-SVN: r44350
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bob/inherit2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/groff1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/flow1.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/unwind1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template31.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/warning2.C4
7 files changed, 9 insertions, 7 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C b/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
index 52d35b0..fe9e73b 100644
--- a/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
+++ b/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
@@ -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 {
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C b/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
index 89e8469..b026037 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
@@ -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()
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/flow1.C b/gcc/testsuite/g++.old-deja/g++.eh/flow1.C
index 024670c..6ba76d7 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/flow1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/flow1.C
@@ -3,6 +3,7 @@
int bar ()
{
throw 100;
+ return 0;
}
int main ()
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C b/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
index 617b355..75bb614 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
@@ -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;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
index ef5d4db..d8e9987 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
@@ -5,7 +5,7 @@
struct A
{
- int f(int a) { }
+ int f(int a) { return 0; }
void f(int a, int b) { }
};
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template31.C b/gcc/testsuite/g++.old-deja/g++.jason/template31.C
index 15e91fd..53fa355 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/template31.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template31.C
@@ -25,6 +25,7 @@ public:
}
IncludeIt& operator=(const IncludeIt& i) {
myStrvec = i.myStrvec;
+ return *this;
}
private:
CopyMe myStrvec;
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning2.C b/gcc/testsuite/g++.old-deja/g++.jason/warning2.C
index 6b51dd0..b0d2d9e 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/warning2.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/warning2.C
@@ -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()
{