summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/pr31952-3.C
blob: 9fe5f02837860693c243a602a44518cc8ba8d348 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// PR c++/31952

int
f0 (int bar)     // { dg-message "previously" }
try
{
  return 0;
}
catch (int bar)  // { dg-error "redeclaration" }
{
  return 1;
}

int
f1 (int bar)
{
  try
  {
    return 0;
  }
  catch (int bar)  // Ok, not a function-try-block.
  {
    return 1;
  }
}