summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/else-2.C
blob: 7f0b23cd701d2819895348015a431af96b374fbf (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do compile }
// { dg-options " " }

int f()
{

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