[gcc(refs/vendors/riscv/heads/gcc-15-with-riscv-opts)] RISC-V: Clean up build warnings for VLS calling convention
Jeff Law
law@gcc.gnu.org
Fri Jan 30 07:07:37 GMT 2026
https://gcc.gnu.org/g:3c2b0c1941e4b53aa7900eb789018d1256fc0009
commit 3c2b0c1941e4b53aa7900eb789018d1256fc0009
Author: Kito Cheng <kito.cheng@sifive.com>
Date: Tue Oct 28 10:15:53 2025 +0800
RISC-V: Clean up build warnings for VLS calling convention
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_get_vls_cc_attr): Fix error message
parameter order and add check_only condition. Improve diagnostic
message formatting with proper quoting.
(riscv_handle_rvv_vls_cc_attribute): Anonymize unused node parameter.
(cherry picked from commit 27861393a92d00f8ab7b0f139075ad43dd418282)
Diff:
---
gcc/config/riscv/riscv.cc | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index adc8b088d3f4..59ebec9f0bfc 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -7101,13 +7101,13 @@ riscv_get_vls_cc_attr (const_tree args, bool check_only = false)
abi_vlen = TREE_INT_CST_LOW (vlen_arg);
}
- if (!riscv_valid_abi_vlen_vls_cc_p (abi_vlen))
+ if (!riscv_valid_abi_vlen_vls_cc_p (abi_vlen) && !check_only)
{
error_at (input_location,
- "unsupported ABI_VLEN value %d for %qs attribute;"
- "ABI_VLEN must be in the range [32, 16384] and must be "
- "a power of 2.",
- "riscv_vls_cc", abi_vlen);
+ "unsupported %<ABI_VLEN%> value %d for %qs attribute;"
+ "%<ABI_VLEN must%> be in the range [32, 16384] and must be "
+ "a power of 2",
+ abi_vlen, "riscv_vls_cc");
return RISCV_CC_UNKNOWN;
}
@@ -7258,7 +7258,7 @@ riscv_handle_type_attribute (tree *node ATTRIBUTE_UNUSED, tree name, tree args,
}
static tree
-riscv_handle_rvv_vls_cc_attribute (tree *node, tree name, tree args,
+riscv_handle_rvv_vls_cc_attribute (tree *, tree name, tree args,
ATTRIBUTE_UNUSED int flags,
bool *no_add_attrs)
{
More information about the Gcc-cvs
mailing list