Commit a89dd072 by Jason Merrill

fix noreturn warnings

From-SVN: r44350
parent 31d8a3ac
...@@ -5,7 +5,7 @@ public: ...@@ -5,7 +5,7 @@ public:
A(void) {} A(void) {}
private: private:
A(const A &) { abort(); } // ERROR - 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 { class B : public A {
......
...@@ -16,8 +16,8 @@ public: ...@@ -16,8 +16,8 @@ public:
class dictionary class dictionary
{ {
public: public:
void *lookup(symbol s, void *v=0) { win = 1; } void lookup(symbol s, void *v=0) { win = 1; }
void *lookup(const char *) {} void lookup(const char *) {}
}; };
int main() int main()
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
int bar () int bar ()
{ {
throw 100; throw 100;
return 0;
} }
int main () int main ()
......
// Test that unwinding properly restores SP. // Test that unwinding properly restores SP.
// Contributed by Jason Merrill <jason@cygnus.com> // Contributed by Jason Merrill <jason@cygnus.com>
int f (int i) void f (int i)
{ {
throw i; throw i;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
struct A struct A
{ {
int f(int a) { } int f(int a) { return 0; }
void f(int a, int b) { } void f(int a, int b) { }
}; };
......
...@@ -25,6 +25,7 @@ public: ...@@ -25,6 +25,7 @@ public:
} }
IncludeIt& operator=(const IncludeIt& i) { IncludeIt& operator=(const IncludeIt& i) {
myStrvec = i.myStrvec; myStrvec = i.myStrvec;
return *this;
} }
private: private:
CopyMe myStrvec; CopyMe myStrvec;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Build don't link: // Build don't link:
struct A { struct A {
virtual int f () = 0; virtual void f () = 0;
}; };
struct B: public A { int f () { } }; struct B: public A { void f () { } };
int main() int main()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment