summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/parse-else-error-3.c
blob: 13666f595dd6ea3844199fe61e9268b05265a1af (plain)
1
2
3
4
5
6
7
8
9
10
11
/* PR 23722 */
/* { dg-do compile } */
/* { dg-options "-fsyntax-only" } */
int f()
{

  else  /* { dg-error "'else' without a previous 'if'" } */
    {
      return 0;
    }
}