aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/noreturn-4.c
blob: 6fe144754d05ef9b20d086e9518d061450f7d6cb (plain)
1
2
3
4
5
6
7
8
9
10
/* Check for "noreturn" warning in main. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wmissing-noreturn -ffreestanding" } */
extern void exit (int) __attribute__ ((__noreturn__));

int
main (void) /* { dg-warning "function might be candidate for attribute 'noreturn'" "warn for main" } */
{
  exit (0);
}