OSDN Git Service

gcc/testsuite/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20041231-1.c
1 /* PR17544 Incorrect -Wunreachable-code warning
2    Origin: Giovanni Bajo
3
4    In C99 we append a "return 0;" when finishing a function, but it was
5    not given a source location.  The gimplifier thinks a return statement
6    needs a locus so it would add one, making the compiler generated code
7    visible to the unreachable code warning.  */
8
9 /* { dg-do compile } */
10 /* { dg-options "-std=c99 -O -Wunreachable-code" } */
11
12 int main (void)    // 1
13 {                  // 2
14   return 0;        // 3
15 }                  // 4