Microblaze: -Wmaybe-uninitialized
Jan-Benedict Glaw
jbglaw@lug-owl.de
Fri Sep 3 21:59:41 GMT 2021
Hi!
Building current GAS (0b99a66053fa1e93a984f75a7a3d5343c74882fb) with
an up-to-date GCC results in maybe-uninitialized warnings that seem to
be legit for --target=microblaze-{linux,elf}, ie.:
$ .../configure --target=microblaze-elf --prefix=/tmp/gas-microblaze-elf
[...]
$ make all-gas
[...]
[all 2021-09-03 18:17:30] depbase=`echo config/tc-microblaze.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
[all 2021-09-03 18:17:30] /usr/lib/gcc-snapshot/bin/gcc -DHAVE_CONFIG_H -I. -I. -I. -I../bfd -I./config -I./../include -I./.. -I./../bfd -DLOCALEDIR="\"/tmp/gas-microblaze-elf/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -Wwrite-strings -I./../zlib -g -O2 -MT config/tc-microblaze.o -MD -MP -MF $depbase.Tpo -c -o config/tc-microblaze.o config/tc-microblaze.c &&\
[all 2021-09-03 18:17:30] mv -f $depbase.Tpo $depbase.Po
[all 2021-09-03 18:17:32] config/tc-microblaze.c: In function 'md_assemble':
[all 2021-09-03 18:17:32] config/tc-microblaze.c:1170:27: error: 'immed' may be used uninitialized [-Werror=maybe-uninitialized]
[all 2021-09-03 18:17:32] 1170 | if (immed != (immed % 32))
[all 2021-09-03 18:17:32] | ~~~~~~~^~~~~
[all 2021-09-03 18:17:32] config/tc-microblaze.c:918:16: note: 'immed' declared here
[all 2021-09-03 18:17:32] 918 | unsigned int immed, temp;
[all 2021-09-03 18:17:32] | ^~~~~
[all 2021-09-03 18:17:32] config/tc-microblaze.c:1746:27: error: 'immed' may be used uninitialized [-Werror=maybe-uninitialized]
[all 2021-09-03 18:17:32] 1746 | if (immed != (immed % 32)) {
[all 2021-09-03 18:17:32] | ~~~~~~~^~~~~
[all 2021-09-03 18:17:32] config/tc-microblaze.c:918:16: note: 'immed' declared here
[all 2021-09-03 18:17:32] 918 | unsigned int immed, temp;
[all 2021-09-03 18:17:32] | ^~~~~
[all 2021-09-03 18:17:32] cc1: all warnings being treated as errors
[all 2021-09-03 18:17:32] make[3]: *** [Makefile:1238: config/tc-microblaze.o] Error 1
Thanks,
Jan-Benedict
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20210903/f06928c2/attachment.sig>
More information about the Binutils
mailing list