Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/20030906-1.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* Bug 9862 -- Spurious warnings with -finline-functions. |
2 Copyright (C) 2003 Free Software Foundation Inc. */ | |
3 | |
4 /* { dg-do compile } */ | |
5 /* { dg-options "-O -finline-functions -Wreturn-type" } */ | |
6 | |
7 extern int i; | |
8 extern int foo (void); | |
9 extern int bar (void); | |
10 | |
11 int foo (void) | |
12 { | |
13 if( i ) return 0; | |
14 else return 1; | |
15 } | |
16 | |
17 int bar (void) | |
18 { | |
19 if( i ) return; /* { dg-warning "'return' with no value, in function returning non-void" } */ | |
20 else return 1; | |
21 } |