Commit: Fix building s390 target with clang
Jens Remus
jremus@linux.ibm.com
Thu Oct 24 14:51:12 GMT 2024
On 24.11.2023 09:09, Nick Clifton wrote:
> Hi Guys,
>
> I am applying the patch below to fix a compile time warning message
> when building the binutils for the s390 using clang:
>
> opcodes/s390-opc.c:265:20: error: unused function 'unused_s390_operands_static_asserts' [-Werror,-Wunused-function]
>
> I also tidies up the formatting of the function at the same time.
>
> Cheers
> Nick
>
> diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
> index 0427bd8b2e0..cbfdb3df0b7 100644
> --- a/opcodes/s390-opc.c
> +++ b/opcodes/s390-opc.c
> @@ -262,9 +262,10 @@ const struct s390_operand s390_operands[] =
>
> };
>
> -static inline void unused_s390_operands_static_asserts(void)
> +static inline void ATTRIBUTE_UNUSED
> +unused_s390_operands_static_asserts (void)
> {
> - static_assert(ARRAY_SIZE(s390_operands) - 1 == J32_16);
> + static_assert (ARRAY_SIZE (s390_operands) - 1 == J32_16);
> }
>
> /* Macros used to form opcodes. */
>
Backported to binutils-2_41-branch with off-list approval from Andreas.
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303) and z/VSE Support
+49-7031-16-1128 Office
jremus@de.ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des
Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der
Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
More information about the Binutils
mailing list