From: Jason Merrill Date: Wed, 25 Jul 2001 12:06:20 +0000 (-0400) Subject: fix noreturn warnings X-Git-Tag: prereleases/libstdc++-3.0.95~3060 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a89dd0729b538e7c47760f1c003d9890560dc87f;p=thirdparty%2Fgcc.git fix noreturn warnings From-SVN: r44350 --- diff --git a/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C b/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C index 52d35b0462c5..fe9e73b95fa1 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 89e8469f720e..b02603789a60 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 024670cf3472..6ba76d7fae31 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 617b355a6c69..75bb614e5413 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 -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 ef5d4dbbc67c..d8e9987a45ca 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 15e91fde7f78..53fa3552856b 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 6b51dd052196..b0d2d9ed65dd 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() {