incubator-nuttx/libs
wangming9 61a38ca680 libs/libxx/libcxx: Fix compilation warnings
Summary
Workaround the following warning with "GCC 12"
CXX:  libcxxabi/src/cxa_demangle.cpp In file included from libcxx/src/locale.cpp:15:
In member function 'std::__1::_EnableIf<std::__1::__is_cpp17_forward_iterator<_ForwardIterator>::value> std::__1::basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = const wchar_t*; _CharT = wchar_t; _Traits = std::__1::char_traits<wchar_t>; _Allocator = std::__1::allocator<wchar_t>]',    inlined from 'std::__1::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator, _InputIterator) [with _InputIterator = const wchar_t*; <template-parameter-2-2> = void; _CharT = wchar_t; _Traits = std::__1::char_traits<wchar_t>; _Allocator = std::__1::allocator<wchar_t>]' at include/libcxx/string:2182:11,
    inlined from 'virtual int std::__1::collate_byname<wchar_t>::do_compare(const char_type*, const char_type*, const char_type*, const char_type*) const' at libcxx/src/locale.cpp:764:33:
include/libcxx/string:2156:35: warning: 'lhs' may be used uninitialized [-Wmaybe-uninitialized]
 2156 |         this->__throw_length_error();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~

include/libcxx/new:237:24: warning: argument 1 value '18446744073709551599' exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  237 |   return ::operator new(__args...);
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~

Signed-off-by: wangming9 <wangming9@xiaomi.com>
2023-09-09 17:08:23 +03:00
..
libc libs/libc: Modify the Kconfig error description 2023-09-09 17:08:23 +03:00
libdsp
libm libm: ignore git submodules 2023-09-07 11:27:00 +03:00
libnx cmake:support nxlib cmake compilation 2023-08-10 23:18:56 +08:00
libxx libs/libxx/libcxx: Fix compilation warnings 2023-09-09 17:08:23 +03:00
CMakeLists.txt
README.txt

README.txt

README
======

This directory holds NuttX libraries.  Libraries in NuttX are very special
creatures.  They have these properties:

1. They can be shared by both application logic and logic within the OS when
   using the FLAT build.

2. But in PROTECTED and KERNEL modes, they must be built differently:  The
   copies used by applications and the OS cannot be the same.  Rather,
   separate versions of libraries must be built for the kernel and for
   applications.

3. When used by the OS, some special care must be taken to assure that the
   OS logic does not disrupt the user's errno value and that the OS does
   not create inappropriate cancellation points.

   For example, sem_wait() is both a cancellation point and modifies the
   errno value.  So within the FLAT build and without kernel version for
   the PROTECTED and KERNEL builds, the special internal OS interface
   nxsem_wait() must be used.  Within libraries, the macro _SEM_WAIT()
   (as defined in include/nuttx/semaphore.h) is used instead.  The
   definition of this macro accounts for the different usage environments.

NOTE:  The libraries under libs/ build differently from other NuttX
components:  There are no build-related files in the libs/ directory; it
is simply a container for other well-known, individual library directories.
The upper level Makefile logic is aware of the libraries within the libs/
container.

The only real function of the libs/ directory is to prevent the top-level
directory from becoming cluttered with individual libraries.