You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/25 03:57:51 UTC
[incubator-nuttx] 03/05: libcxx: Disable -Wshadow for locale.cpp
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/incubator-nuttx.git
commit 6481b774e454d392960729d8240a0e7956dbc200
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Oct 23 09:16:07 2020 +0900
libcxx: Disable -Wshadow for locale.cpp
This might be specific to gcc or Linux
as I didn't see it with clang + macOS.
libcxx/src/locale.cpp: In member function 'void std::__1::locale::__install_ctor(const std::__1::locale&, std::__1::locale::facet*, long int)':
libcxx/src/locale.cpp:576:62: warning: declaration of 'id' shadows a member of 'std::__1::locale' [-Wshadow]
576 | locale::__install_ctor(const locale& other, facet* f, long id)
| ^
In file included from /Users/yamamoto/git/nuttx/nuttx/include/libcxx/locale:181,
from libcxx/src/locale.cpp:16:
/Users/yamamoto/git/nuttx/nuttx/include/libcxx/__locale:203:32: note: shadowed declaration is here
203 | class _LIBCPP_TYPE_VIS locale::id
| ^~
---
libs/libxx/libcxx.defs | 1 +
1 file changed, 1 insertion(+)
diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs
index 9bcd74e..0076302 100644
--- a/libs/libxx/libcxx.defs
+++ b/libs/libxx/libcxx.defs
@@ -56,6 +56,7 @@ CXXFLAGS += ${shell $(DEFINE) "$(CC)" _LIBCPP_BUILDING_LIBRARY}
# 29 | ptrdiff_t& __expected;
# | ^~~~~~~~~~
libcxx/src/barrier.cpp_CXXFLAGS += -Wno-shadow
+libcxx/src/locale.cpp_CXXFLAGS += -Wno-shadow
CPPSRCS += $(notdir $(wildcard libcxx/src/*.cpp))
CPPSRCS += $(notdir $(wildcard libcxx/src/experimental/*.cpp))