This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit af292daf2b69007bc18f95f298b65c078d2415a1
Author: Petro Karashchenko <[email protected]>
AuthorDate: Wed May 17 23:05:11 2023 +0300

    include/nuttx: unify feature definition in compiler.h
    
    Signed-off-by: Petro Karashchenko <[email protected]>
---
 include/nuttx/compiler.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index d223433de4..e4a89b888e 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -63,10 +63,10 @@
 
 /* C++ support */
 
+#undef CONFIG_HAVE_CXX14
+
 #if defined(__cplusplus) && __cplusplus >= 201402L
 #  define CONFIG_HAVE_CXX14 1
-#else
-#  undef CONFIG_HAVE_CXX14
 #endif
 
 /* GCC-specific definitions *************************************************/
@@ -123,6 +123,8 @@
  * unnecessary "weak" functions can be excluded from the link.
  */
 
+#undef CONFIG_HAVE_WEAKFUNCTIONS
+
 #  if !defined(__CYGWIN__) && !defined(CONFIG_ARCH_GNU_NO_WEAKFUNCTIONS)
 #    define CONFIG_HAVE_WEAKFUNCTIONS 1
 #    define weak_alias(name, aliasname) \
@@ -131,7 +133,6 @@
 #    define weak_function __attribute__((weak))
 #    define weak_const_function __attribute__((weak, __const__))
 #  else
-#    undef  CONFIG_HAVE_WEAKFUNCTIONS
 #    define weak_alias(name, aliasname)
 #    define weak_data
 #    define weak_function

Reply via email to