blob: 35d05eb6012c80a7b832fae904f6b4a37d7f4083 [file] [log] [blame]
// PR c++/88554
// { dg-do compile }
// { dg-options "-Wreturn-type" }
struct X {
friend X & operator+= (X &, int) { } // { dg-warning "no return statement in function returning non-void" }
// { dg-bogus "return \\*this;" "" { target *-*-* } .-1 }
};
struct Y {};
Y & operator += (Y &, Y &) { } // { dg-warning "no return statement in function returning non-void" }
// { dg-bogus "return \\*this;" "" { target *-*-* } .-1 }