URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [except6.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "-fexceptions" }
// GROUPS passed exceptions
// except file
// From: GUSTAVO%DRAGON@orion.cpqd.ansp.br
// Date: 15 Dec 1993 09:33:30 +0000 (C)
// Subject: exception handling problem
// Message-ID: <01H6I5GEAF5UPBJ0UV@VENUS.CPQD.ANSP.BR>
struct Exception
{
int v;
Exception(int i) { v = i; };
};
void inc(int &i)
{
try {
if (i == 0)
throw Exception(i);
else
i++;
}
catch (Exception v) {
i = v.v;
}
}