]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgcc: Fix aarch64 build
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 15 Jul 2025 15:56:31 +0000 (08:56 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Tue, 15 Jul 2025 16:08:20 +0000 (09:08 -0700)
For aarch64, libgcc is built with -Werror, after the latest
-Wunused-but-set* commit (r16-2258-g0eac9cfee8cb0b21d), a new warning
showed up:
```
../../../gcc/libgcc/config/libbid/bid_binarydecimal.c: In function
‘__binary32_to_bid128’:
../../../gcc/libgcc/config/libbid/bid_binarydecimal.c:130:31: error:
variable ‘c3’ set but not used [-Werror=unused-but-set-variable=]
  130 | { unsigned long long c0,c1,c2,c3;                               \
      |                               ^~
../../../gcc/libgcc/config/libbid/bid_binarydecimal.c:146842:5: note:
in expansion of macro ‘__mul_10x256_to_256’
146842 |     __mul_10x256_to_256 (z.w[5], z.w[4], z.w[3], z.w[2],
z.w[5], z.w[4],
       |     ^~~~~~~~~~~~~~~~~~~
```

This fixes it by casting c3 to void after the last __mul_10x64 in
__mul_10x256_to_256 macro to mark it as being "used".

libgcc/config/libbid/ChangeLog:

* bid_binarydecimal.c (__mul_10x256_to_256): Mark c3 as being
used.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
libgcc/config/libbid/bid_binarydecimal.c

index daca2ffe306f76429ec316a3f6b8fe37c15afce9..12e32b9667aafc2cf1020e41b23bed1751494d6f 100644 (file)
@@ -132,6 +132,7 @@ UINT64 CY;                                                      \
   __mul_10x64(p1,c1,a1,c0);                                     \
   __mul_10x64(p2,c2,a2,c1);                                     \
   __mul_10x64(p3,c3,a3,c2);                                     \
+  (void)c3;                                                    \
 }
 
 // Set up indices for low and high parts, depending on the endian-ness.