On 6 June 2012 11:49, Dimitry Andric <dim_at_freebsd.org> wrote: > This is because clang suppresses a number of warnings for specific > patterns in macros. Since ccache passes clang the preprocessed file, > those suppressions will not work, and some additional warnings can be > triggered. > > See also the following threads on the cfe-dev mailing list: > > http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/017250.html > http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/021824.html > > That said, I had a look at the specific warnings you posted for libc, > and they are easy enough to fix. Please try the attached patch. Worked a treat, now it barfs on libelf /usr/local/libexec/ccache/world/cc -O2 -fno-strict-aliasing -pipe -march=core2 -I/usr/src/lib/libelf -I/usr/src/lib/libelf/../../sys -DLIBELF_TEST_HOOKS -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c /usr/src/lib/libelf/elf_strptr.c -o elf_strptr.o In file included from /usr/src/lib/libelf/elf_scn.c:1: /usr/src/lib/libelf/elf_scn.c:198:41: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if (((&e->e_u.e_elf.e_scn)->stqh_first == ((void *)0))) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /usr/src/lib/libelf/elf_scn.c:198:41: note: remove extraneous parentheses around the comparison to silence this warning if (((&e->e_u.e_elf.e_scn)->stqh_first == ((void *)0))) { ~ ^ ~ /usr/src/lib/libelf/elf_scn.c:198:41: note: use '=' to turn this equality comparison into an assignment if (((&e->e_u.e_elf.e_scn)->stqh_first == ((void *)0))) { ^~ = 1 error generated. *** [elf_scn.So] Error code 1 In file included from /usr/src/lib/libelf/elf_scn.c:1: /usr/src/lib/libelf/elf_scn.c:198:41: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if (((&e->e_u.e_elf.e_scn)->stqh_first == ((void *)0))) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /usr/src/lib/libelf/elf_scn.c:198:41: note: remove extraneous parentheses around the comparison to silence this warning if (((&e->e_u.e_elf.e_scn)->stqh_first == ((void *)0))) { ~ ^ ~ /usr/src/lib/libelf/elf_scn.c:198:41: note: use '=' to turn this equality comparison into an assignment if (((&e->e_u.e_elf.e_scn)->stqh_first == ((void *)0))) { ^~ = 1 error generated. *** [elf_scn.o] Error code 1 In file included from /usr/src/lib/libelf/elf_update.c:1: /usr/src/lib/libelf/elf_update.c:570:32: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if (((&s->s_data)->stqh_first == ((void *)0))) { ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /usr/src/lib/libelf/elf_update.c:570:32: note: remove extraneous parentheses around the comparison to silence this warning if (((&s->s_data)->stqh_first == ((void *)0))) { ~ ^ ~ /usr/src/lib/libelf/elf_update.c:570:32: note: use '=' to turn this equality comparison into an assignment if (((&s->s_data)->stqh_first == ((void *)0))) { ^~ = 1 error generated. *** [elf_update.o] Error code 1Received on Wed Jun 06 2012 - 14:51:57 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:27 UTC