Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/noreturn-7.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/30988 |
2 // { dg-do compile } | |
3 // { dg-options "-O2 -Wall" } | |
4 | |
5 void f (const char *) __attribute__ ((noreturn)); | |
6 void f (int); | |
7 void f (double) __attribute__ ((noreturn)); | |
8 | |
9 template <typename T> struct A | |
10 { | |
11 int g () | |
12 { | |
13 f ((T) 0); | |
14 } // { dg-warning "no return statement in function returning non-void" } | |
15 }; |