|
From: Jeffrey Y. <jya...@gm...> - 2011-01-06 00:38:04
|
I was removing warnings from valgrind.h with the svn version of gcc-4.6 (https://bugs.kde.org/show_bug.cgi?id=262260), and while testing my change I ran into a couple other warnings that you might want to know about. They're not in my way, so I don't plan to fix them myself, but if you want me to validate a patch against my gcc build (since gcc takes a while to build yourself) I can do that. The line numbers are all at r11492. $ make check -k CFLAGS="-Werror" CXXFLAGS="-Werror" /home/jyasskin/opensource/gcc/trunk/install/bin/gcc-4.6svn -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -Ipriv -m64 -fo mit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prot otypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wbad-function- cast -Wcast-qual -Wcast-align -fstrict-aliasing -Wno-pointer-sign -Werror -MT libvex_amd64 _linux_a-guest_arm_toIR.o -MD -MP -MF .deps/libvex_amd64_linux_a-guest_arm_toIR.Tpo -c -o libvex_amd64_linux_a-guest_arm_toIR.o `test -f 'priv/guest_arm_toIR.c' || echo './'`priv/g uest_arm_toIR.c priv/guest_arm_toIR.c: In function ‘disInstr_ARM’: priv/guest_arm_toIR.c:17787:14: error: ‘insn1’ may be used uninitialized in this function [-Werror=uninitialized] priv/guest_arm_toIR.c:15761:11: note: ‘insn1’ was declared here priv/guest_arm_toIR.c:17793:15: error: ‘old_itstate’ may be used uninitialized in this fun ction [-Werror=uninitialized] priv/guest_arm_toIR.c:14276:11: note: ‘old_itstate’ was declared here cc1: all warnings being treated as errors /home/jyasskin/opensource/gcc/trunk/install/bin/gcc-4.6svn -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../include -I../../../coregrind -I../../../include -I../../../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -Winline -Wall -Wshadow -g -m32 -mmmx -msse -Wno-pointer-sign -Werror -MT fxtract.o -MD -MP -MF .deps/fxtract.Tpo -c -o fxtract.o fxtract.c fxtract.c: In function ‘main’: fxtract.c:60:3: error: floating constant truncated to zero [-Werror=overflow] fxtract.c:61:3: error: floating constant truncated to zero [-Werror=overflow] fxtract.c:94:3: error: floating constant truncated to zero [-Werror=overflow] fxtract.c:95:3: error: floating constant truncated to zero [-Werror=overflow] cc1: all warnings being treated as errors There are also a huge number of -Wpointer-sign warnings. I've copied a small sample, but I can send the whole list if you're interested: m_transtab.c:1559:4: error: pointer targets in passing argument 5 of ‘vgPlain_assert_fail’ differ in signedness [-Werror=pointer-sign] ../include/pub_tool_libcassert.h:58:1: note: expected ‘const Char *’ but argument is of type ‘const char *’ m_debuginfo/readdwarf3.c:508:4: error: pointer targets in passing argument 5 of ‘vgPlain_assert_fail’ differ in signedness [-Werror=pointer-sign] ../include/pub_tool_libcassert.h:58:1: note: expected ‘const Char *’ but argument is of type ‘const char *’ m_initimg/initimg-pathscan.c:144:7: error: pointer targets in passing argument 1 of ‘vgPlain_getenv’ differ in signedness [-Werror=pointer-sign] ../include/pub_tool_libcproc.h:42:1: note: expected ‘Char *’ but argument is of type ‘char *’ mc_leakcheck.c:939:4: error: pointer targets in passing argument 1 of ‘find_active_chunks’ differ in signedness [-Werror=pointer-sign] mc_leakcheck.c:330:1: note: expected ‘UInt *’ but argument is of type ‘Int *’ mc_main.c:1357:20: error: pointer targets in initialization differ in signedness [-Werror=pointer-sign] mc_main.c:1358:49: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] mc_replace_strmem.c:847:1: error: pointer targets in return differ in signedness [-Werror=pointer-sign] -- Jeffrey |