The function is defined as follows:
namespace _com_util {
inline void CheckError(HRESULT hr) throw() {
if(FAILED(hr)) { _com_issue_error(hr); }
}
}
but _com_issue_error is defined as:
inline void _com_issue_error(HRESULT hr) {
#if __EXCEPTIONS
throw _com_error(hr);
#else
/* This is designed to use exceptions. If exceptions are disabled,
there is not much we can do here. */
__debugbreak();
#endif
}
so actually calling it with a failed HRESULT crashes the program. I
think the empty exception specification should simply be dropped.
See https://bugs.debian.org/816427
Reported-by: Sam Morris <[email protected]>
Signed-off-by: Stephen Kitt <[email protected]>
---
mingw-w64-headers/include/comutil.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-headers/include/comutil.h
b/mingw-w64-headers/include/comutil.h
index f6d7adcf..e090067c 100644
--- a/mingw-w64-headers/include/comutil.h
+++ b/mingw-w64-headers/include/comutil.h
@@ -44,7 +44,7 @@ class _bstr_t;
class _variant_t;
namespace _com_util {
- inline void CheckError(HRESULT hr) throw() {
+ inline void CheckError(HRESULT hr) {
if(FAILED(hr)) { _com_issue_error(hr); }
}
}
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public