File: 14026.cc

package info (click to toggle)
gcc-h8300-hms 1%3A3.4.6%2Bdfsg2-4.2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 94,620 kB
  • sloc: ansic: 627,399; cpp: 89,017; makefile: 24,797; asm: 21,058; sh: 16,616; yacc: 3,740; perl: 718; xml: 692; lex: 587; exp: 298; awk: 223; pascal: 86; lisp: 59; sed: 37
file content (34 lines) | stat: -rw-r--r-- 396 bytes parent folder | download | duplicates (10)
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
26
27
28
29
30
31
32
33
34
// PR 14026
// 18.6.4 uncaught_exception

#include <cstdlib>
#include <exception>
#include <testsuite_hooks.h>

static void
no_uncaught ()
{
  if (std::uncaught_exception ())
    abort ();
}

int
main ()
{
  try
    {
      throw 1;
    }
  catch (...)
    {
      try
        {
          throw;
        }
      catch (...)
        {
          no_uncaught ();
        }
    }
  no_uncaught ();
}