summaryrefslogtreecommitdiff
path: root/components/libc/cplusplus/cpp11/gcc
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2023-06-14 00:03:38 -0400
committerMan, Jianting (Meco) <[email protected]>2023-06-14 08:49:33 -0400
commit4f5ba63c7c94b37515c2b3f3c4ae423585795d0c (patch)
tree865bf3b9674a33ad4daf93f994decc3adb6bbb27 /components/libc/cplusplus/cpp11/gcc
parentc4df1d6a19c2ab9c67b42150adb81f49757b6f8c (diff)
[cpp] attach CXXFLAGS to reduce the resource consumptions
Diffstat (limited to 'components/libc/cplusplus/cpp11/gcc')
-rw-r--r--components/libc/cplusplus/cpp11/gcc/__utils.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/components/libc/cplusplus/cpp11/gcc/__utils.h b/components/libc/cplusplus/cpp11/gcc/__utils.h
index f9a3c93796..304d789ab5 100644
--- a/components/libc/cplusplus/cpp11/gcc/__utils.h
+++ b/components/libc/cplusplus/cpp11/gcc/__utils.h
@@ -17,11 +17,9 @@
#include <rtthread.h>
-#define RT_USING_CPP_EXCEPTION
-
inline void throw_system_error(int err, const char *what_msg)
{
-#ifdef RT_USING_CPP_EXCEPTION
+#ifdef RT_USING_CPP_EXCEPTIONS
throw std::system_error(std::error_code(err, std::system_category()), what_msg);
#else
(void)err;