[PATCH 0/4] bitpos expansion summary reloaded
Siddhesh Poyarekar
siddhesh@redhat.com
Wed Oct 3 13:12:00 GMT 2012
On Sun, 30 Sep 2012 08:52:11 +0200, Jan wrote:
> Or gcc with -Wconversion:
> t.c: In function âmainâ:
> t.c:5:3: warning: conversion to âintâ from âlong intâ may alter its
> value [-Wconversion] t.c:6:24: warning: conversion to âintâ from
> âlong intâ may alter its value [-Wconversion]
I played around with this briefly today and there seem to be an
additional 175 warnings that gcc finds and splint doesn't on x86_64.
Here's how I've gone about it:
First, I configured gdb as:
CC="gcc -Wconversion -Wno-sign-conversion" \
CXX="g++ -Wconversion -Wno-sign-conversion" \
../gdb.git/configure --enable-targets=all --disable-werror
So that I get only the truncation warnings and none of the sign
conversion ones.
I built the master and bitpos-expand branches (the latter being the one
with my patches):
make 2> build-warnings.out
and then filtered only the "warning: " lines.
I then processed the two files with this wonderful looking command:
diff -u build-master.out build-bitpos.out |
perl -e 'while(<>){s{^(.)(.*)}{print "$2$1\n"}egm}' | sort |
perl -e 'while(<>){s{^([^\]]+\])(.)$}{print "$2$1\n"}egm}' |
grep "^[-+]" | ./checkreport2.pl | grep -v "^----" |
grep -v "^+++" | grep "^+" |
perl -e \
'while(<>){s{^([^\/]+/)+([^:]+:[^:]+):.*}{print "$2\n"}egm}' |
while read loc; do
grep -q "$loc" splint-bitpos3.locdiff.processed
if [ $? -eq 0 ]; then
echo "FOUND: $loc"
else
echo "NOTFOUND: $loc"
fi
done |
grep "^NOTFOUND"
The checkreport2.pl is attached. I'll look through this list and see
if any of the warnings are relevant.
Regards,
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checkreport2.pl
Type: application/x-perl
Size: 2148 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20121003/4faecbc7/attachment.pl>
More information about the Gdb-patches
mailing list