Skip to content

Commit 113e9f6

Browse files
Use __builtin_exit instead of std::exit, and drop <cstdlib>
1 parent cb5f664 commit 113e9f6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gcc/testsuite/g++.dg/contracts/cpp26/contract-violation-noexcept2.C

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// { dg-additional-sources "throwing-violation-handler.cc" }
55

66
#include <exception>
7-
#include <cstdlib>
87

98
void f(int x) noexcept pre(x >= 0)
109
{
@@ -17,7 +16,7 @@ bool f_result = true;
1716
void my_term()
1817
{
1918
try { throw; }
20-
catch(int) { std::exit(0); }
19+
catch(int) { __builtin_exit(0); }
2120
}
2221

2322

0 commit comments

Comments
 (0)