Commit: PR 21964: Fix testcase compile time warnings
Nick Clifton
nickc@redhat.com
Tue Mar 1 10:09:54 GMT 2022
Hi Guys,
I am checking in the attached patch to fix a compile time warning
generated by GCC version 12 when building the source files for the
pr21964 linker test cases:
ld/testsuite/ld-elf/pr21964-1a.c: In function 'foo1':
ld/testsuite/ld-elf/pr21964-1a.c:7:25: warning: comparison between two arrays [-Warray-compare]
7 | if (__start___verbose == __stop___verbose
ld/testsuite/ld-elf/pr21964-1a.c:7:25: note: use '&__start___verbose[0] == &__stop___verbose[0]' to compare the addresses
There are similar warnings for the other source files for this PR and
this patch fixes them all. The presence of the warning messages means
that the tests are considered to be UNSUPPORTED when in fact they do
work.
Cheers
Nick
ld/ChangeLog
2022-03-01 Nick Clifton <nickc@redhat.com>
PR 21964
* testsuite/ld-elf/pr21964-1a.c: Fix array comparisons.
* testsuite/ld-elf/pr21964-1b.c: Likewise.
* testsuite/ld-elf/pr21964-1c.c: Likewise.
* testsuite/ld-elf/pr21964-2a.c: Likewise.
* testsuite/ld-elf/pr21964-2b.c: Likewise.
* testsuite/ld-elf/pr21964-3a.c: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr21964-testcases.patch
Type: text/x-patch
Size: 2740 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20220301/0dea4e58/attachment-0001.bin>
More information about the Binutils
mailing list