Commit ae82a1a3 authored by Kito Cheng's avatar Kito Cheng Committed by Jeremy Bennett
Browse files

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.
parent c49943cf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment