fix noreturn warnings

From-SVN: r44350
This commit is contained in:
Jason Merrill 2001-07-25 08:06:20 -04:00
parent 31d8a3ac1c
commit a89dd0729b
7 changed files with 9 additions and 7 deletions

View 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 {

View 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()

View File

@ -3,6 +3,7 @@
int bar ()
{
throw 100;
return 0;
}
int main ()

View 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;
}

View File

@ -5,7 +5,7 @@
struct A
{
int f(int a) { }
int f(int a) { return 0; }
void f(int a, int b) { }
};

View File

@ -25,6 +25,7 @@ public:
}
IncludeIt& operator=(const IncludeIt& i) {
myStrvec = i.myStrvec;
return *this;
}
private:
CopyMe myStrvec;

View 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()
{