PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wreturn-type-6.C
blob45ec95236b6e456d9732f09fc32d2d6f06e33929
1 /* PR c++/40749 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wreturn-type" } */
5 struct A {};
6 const A a() {} /* { dg-warning "no return statement" } */
7 const A& b() {} /* { dg-warning "no return statement" } */
9 const int c() {} /* { dg-warning "no return statement" } */
11 template<class T>
12 const int foo(T t) {} /* { dg-warning "no return statement" } */
13 int d = foo<int>(0), e = foo<int>(1);