From 11eead4cdf1769c320134d97b204787de23466df Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 2 Apr 2021 16:56:07 +0200 Subject: [PATCH] CxxUtils: Fix gcc10 warning. Fix signature of __cxa_throw. --- Control/CxxUtils/src/exctrace/exctrace_collector.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Control/CxxUtils/src/exctrace/exctrace_collector.cxx b/Control/CxxUtils/src/exctrace/exctrace_collector.cxx index 881ed0d5cf9b..964c4a694604 100644 --- a/Control/CxxUtils/src/exctrace/exctrace_collector.cxx +++ b/Control/CxxUtils/src/exctrace/exctrace_collector.cxx @@ -32,7 +32,7 @@ static thread_local int exctrace_last_depth = 0; static thread_local void* exctrace_last_trace[bt_depth]; // The real __cxa_throw function. -typedef void throwfn (void*, std::type_info*, void (*dest)(void*)); +typedef void throwfn (void*, void*, void (*dest)(void*)); static throwfn* old_throw; extern "C" { @@ -50,11 +50,13 @@ extern "C" { // The __cxa_throw hook function. // Record a backtrace, then chain to the real throw function. extern "C" void __cxa_throw (void* thrown_exception, - std::type_info* tinfo, + void* tinfo, void (*dest)(void*)) { exctrace_last_depth = backtrace (exctrace_last_trace, bt_depth); old_throw (thrown_exception, tinfo, dest); + // not reached + std::abort(); } -- GitLab