aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/abi/pr98531-4.C
blob: ec64ee07a17be8510179ce217e4875b825f3b858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile { target c++11 } }
// { dg-additional-options -fno-use-cxa-atexit }
// PR 98531  Making __cxa_atexit (or atexit) more visible means it
// must be consistent with the std library's declarations

struct C
{
  ~C () noexcept;
  C () noexcept;
};

C &frob ()
{
  static C c; // Requires atexit functionality

  return c;
}

extern "C" int atexit (void (*) (void));