aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.eh/throw2.C
blob: fbf0cec9c35d702a88c50aece5f356e696a0117c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Build don't link:

// Submitted by Sebastian Ritterbusch <uabp@rz.uni-karlsruhe.de>

#define ANY int // a class with a public constructor

void athrow(const ANY & e) throw(ANY)
{
   throw e; // gets bogus error - discarding const
}

int main(void)
{
   athrow(ANY());
   return 0;
}