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