libxx: New sized delete operators are only for C++14
This commit is contained in:
parent
f383308a02
commit
d0343565c0
@ -76,6 +76,14 @@
|
||||
# define CONFIG_HAVE_BUILTIN_CLZ 1
|
||||
#endif
|
||||
|
||||
/* C++ support */
|
||||
|
||||
#if __cplusplus == 201402L
|
||||
# define CONFIG_HAVE_CXX14 1
|
||||
#else
|
||||
# undef CONFIG_HAVE_CXX14
|
||||
#endif
|
||||
|
||||
/* Attributes
|
||||
*
|
||||
* GCC supports weak symbols which can be used to reduce code size because
|
||||
@ -130,7 +138,7 @@
|
||||
# define inline_function __attribute__ ((always_inline,no_instrument_function))
|
||||
# define noinline_function __attribute__ ((noinline))
|
||||
|
||||
/* GCC has does not use storage classes to qualify addressing */
|
||||
/* GCC does not use storage classes to qualify addressing */
|
||||
|
||||
# define FAR
|
||||
# define NEAR
|
||||
@ -281,6 +289,10 @@
|
||||
|
||||
# pragma disable_warning 85
|
||||
|
||||
/* C++ support */
|
||||
|
||||
# undef CONFIG_HAVE_CXX14
|
||||
|
||||
/* Attributes
|
||||
*
|
||||
* SDCC does not support weak symbols */
|
||||
@ -399,6 +411,10 @@
|
||||
# define IOBJ
|
||||
# define IPTR
|
||||
|
||||
/* C++ support */
|
||||
|
||||
# undef CONFIG_HAVE_CXX14
|
||||
|
||||
/* Attributes
|
||||
*
|
||||
* The Zilog compiler does not support weak symbols
|
||||
@ -529,6 +545,10 @@
|
||||
# pragma section = ".data_init"
|
||||
# pragma section = ".text"
|
||||
|
||||
/* C++ support */
|
||||
|
||||
# undef CONFIG_HAVE_CXX14
|
||||
|
||||
/* Unknown compiler *********************************************************/
|
||||
|
||||
#else
|
||||
@ -538,6 +558,7 @@
|
||||
# undef CONFIG_HAVE_FUNCTIONNAME
|
||||
# undef CONFIG_HAVE_FILENAME
|
||||
# undef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
# undef CONFIG_HAVE_CXX14
|
||||
# define weak_alias(name, aliasname)
|
||||
# define weak_function
|
||||
# define weak_const_function
|
||||
|
@ -37,10 +37,12 @@
|
||||
// Included Files
|
||||
//***************************************************************************
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include "libxx.hxx"
|
||||
|
||||
#ifdef CONFIG_HAVE_CXX14
|
||||
|
||||
//***************************************************************************
|
||||
// Operators
|
||||
//***************************************************************************
|
||||
@ -68,3 +70,5 @@ void operator delete(FAR void *ptr, unsigned int size)
|
||||
{
|
||||
lib_free(ptr);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAVE_CXX14 */
|
||||
|
@ -38,9 +38,12 @@
|
||||
//***************************************************************************
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include "libxx.hxx"
|
||||
|
||||
#ifdef CONFIG_HAVE_CXX14
|
||||
|
||||
//***************************************************************************
|
||||
// Operators
|
||||
//***************************************************************************
|
||||
@ -58,3 +61,5 @@ void operator delete[](FAR void *ptr, unsigned int size)
|
||||
{
|
||||
lib_free(ptr);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAVE_CXX14 */
|
||||
|
Loading…
Reference in New Issue
Block a user