summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/20041231-1.c
blob: 37c9fe04a1f899965735fdccdbf9f51544086e0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR17544 Incorrect -Wunreachable-code warning
   Origin: Giovanni Bajo

   In C99 we append a "return 0;" when finishing a function, but it was
   not given a source location.  The gimplifier thinks a return statement
   needs a locus so it would add one, making the compiler generated code
   visible to the unreachable code warning.  */

/* { dg-do compile } */
/* { dg-options "-std=c99 -O -Wunreachable-code" } */

int main (void)    // 1
{                  // 2
  return 0;        // 3
}                  // 4
OpenPOWER on IntegriCloud