summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c1x-noreturn-3.c
blob: b12c23efafc3e2f2346988d2fcb59d23edbad854 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Test C1X _Noreturn.  Test _Noreturn on main, hosted.  */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors -fhosted" } */

_Noreturn void exit (int);

_Noreturn int
main (void) /* { dg-error "'main' declared '_Noreturn'" } */
{
  exit (0);
}