]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Suppress build warnings
authorKito Cheng <kito.cheng@sifive.com>
Fri, 9 Sep 2022 08:39:08 +0000 (16:39 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Fri, 9 Sep 2022 09:53:21 +0000 (17:53 +0800)
commit6aafd6b797d823fa4e888c36e08f9577137809c6
tree0661b2a7bc4581c5996149a90718febb2a0176a6
parent923da63e0f69b091014df5cc91498756053b1a46
RISC-V: Suppress build warnings

../../gcc/common/config/riscv/riscv-common.cc: In function 'const char* riscv_multi_lib_check(int, const char**)':
../../gcc/common/config/riscv/riscv-common.cc:1451:11: error: bare apostrophe ''' in format [-Werror=format-diag]
 1451 |       "Can't find suitable multilib set for %<-march=%s%>/%<-mabi=%s%>",
      |           ^
../../gcc/common/config/riscv/riscv-common.cc:1451:7: note: if avoiding the apostrophe is not feasible, enclose it in a pair of '%<' and '%>' directives instead
 1451 |       "Can't find suitable multilib set for %<-march=%s%>/%<-mabi=%s%>",
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/common/config/riscv/riscv-common.cc: At global scope:
../../gcc/common/config/riscv/riscv-common.cc:1492:1: error: 'int riscv_check_conds(const switchstr*, int, int, const std::vector<std::__cxx11::basic_string<char> >&)' defined but not used [-Werror=unused-function]
 1492 | riscv_check_conds (
      | ^~~~~~~~~~~~~~~~~
../../gcc/common/config/riscv/riscv-common.cc:1374:1: error: 'const char* find_last_appear_switch(const switchstr*, int, const char*)' defined but not used [-Werror=unused-function]
 1374 | find_last_appear_switch (
      | ^~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:2442: riscv-common.o] Error 1

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc (RISCV_USE_CUSTOMISED_MULTI_LIB):
Move forward for cover all all necessary functions for suppress
unused function warnings.
(riscv_multi_lib_check): Move forward, and tweak message to suppress
-Werror=format-diag warning.
gcc/common/config/riscv/riscv-common.cc
This page took 0.066147 seconds and 6 git commands to generate.