Skip to content

Commit e953fa5

Browse files
authored
Merge pull request #1613 from evoskuil/master
Enable stack tracing in the case of debug builds.
2 parents 9dfbb8a + 106fd08 commit e953fa5

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

include/bitcoin/system/have.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,6 @@
213213
/// Disable to unsuppress warnings.
214214
#define HAVE_SUPPRESSION
215215

216-
/// Disable noexcept to capture stack trace.
217-
////#define HAVE_NOEXCEPT
218-
219216
/// Disable to emit all suppressed warnings.
220217
#define HAVE_WARNINGS
221218

include/bitcoin/system/preprocessor.hpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@
6060
#define BC_DEBUG_ONLY(expression) expression
6161
#endif
6262

63+
#if defined(NDEBUG)
64+
#define NOEXCEPT
65+
#define THROWS
66+
#else
67+
#define NOEXCEPT noexcept
68+
#define THROWS noexcept(false)
69+
#endif
70+
6371
/// Messages.
6472
/// ---------------------------------------------------------------------------
6573

@@ -189,15 +197,6 @@
189197
/// Workarounds for C++ noncompliance.
190198
/// ---------------------------------------------------------------------------
191199

192-
/// C++11 (full)
193-
#if defined(HAVE_NOEXCEPT)
194-
#define NOEXCEPT noexcept
195-
#define THROWS noexcept(false)
196-
#else
197-
#define NOEXCEPT
198-
#define THROWS
199-
#endif
200-
201200
/// C++14 (full)
202201
#if defined(HAVE_DEPRECATED)
203202
#define DEPRECATED [[deprecated]]

0 commit comments

Comments
 (0)