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

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


The following commit(s) were added to refs/heads/master by this push:
     new 3e4bc9bcef libcxx.defs: appease "expr: syntax error" messages with 
clang
3e4bc9bcef is described below

commit 3e4bc9bcef325cb963a644b2ef68b764fa194c40
Author: YAMAMOTO Takashi <yamam...@midokura.com>
AuthorDate: Thu Jan 4 17:02:21 2024 +0900

    libcxx.defs: appease "expr: syntax error" messages with clang
---
 libs/libxx/libcxx.defs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs
index 32e07b0a53..ed456f82dd 100644
--- a/libs/libxx/libcxx.defs
+++ b/libs/libxx/libcxx.defs
@@ -139,9 +139,11 @@ endif
 # warning on gcc >= 12.3.Rel1
 # libcxx/src/string.cpp:58:33: warning: 'template<class _CharT> struct 
std::__1::char_traits' is deprecated: char_traits<T> for T not equal to char, 
wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a 
temporary period. It will be removed in LLVM 18, so please migrate off of it. 
[-Wdeprecated-declarations]
 #    58 | template string operator+<char, char_traits<char>, 
allocator<char>>(char const*, string const&);
+ifneq ($(GCCVER),)
 ifeq ($(shell expr $(GCCVER) \>= 12), 1)
        libcxx/src/string.cpp_CXXFLAGS += -Wno-deprecated-declarations
 endif
+endif
 
 # warning on gcc >= 12.3.Rel1
 # libcxx/src/filesystem/path.cpp:14:
@@ -166,17 +168,21 @@ endif
 # libcxx/src/filesystem/path_parser.h:55:15: note: shadowed declaration is here
 #    55 |   ParserState State;
 #       |               ^~~~~
+ifneq ($(GCCVER),)
 ifeq ($(shell expr $(GCCVER) \>= 12), 1)
        libcxx/src/filesystem/path.cpp_CXXFLAGS += -Wno-shadow
 endif
+endif
 
 # warning on gcc >= 12.3.Rel1
 # libcxx/src/ryu/d2s.cpp:490:31: warning: '_Trailing_zero_bits' may be used 
uninitialized [-Wmaybe-uninitialized]
 #   490 |           _Trailing_zero_bits += 32;
 #       |           ~~~~~~~~~~~~~~~~~~~~^~~~~
+ifneq ($(GCCVER),)
 ifeq ($(shell expr $(GCCVER) \>= 12), 1)
        libcxx/src/ryu/d2s.cpp_CXXFLAGS += -Wno-maybe-uninitialized
 endif
+endif
 
 
 CPPSRCS += $(wildcard libcxx/src/*.cpp)

Reply via email to