From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 744 invoked by alias); 29 Sep 2012 17:39:51 -0000 Received: (qmail 736 invoked by uid 22791); 29 Sep 2012 17:39:50 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 29 Sep 2012 17:39:43 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8THdgJ1006490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 29 Sep 2012 13:39:42 -0400 Received: from host2.jankratochvil.net (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8THdcqg016268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 29 Sep 2012 13:39:41 -0400 Date: Sat, 29 Sep 2012 17:39:00 -0000 From: Jan Kratochvil To: Siddhesh Poyarekar Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 0/4] bitpos expansion summary reloaded Message-ID: <20120929173938.GA2987@host2.jankratochvil.net> References: <20120927190053.1e7de264@spoyarek> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120927190053.1e7de264@spoyarek> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00706.txt.bz2 Hi Siddhesh, I have reported without effect: But for example ada-valprint.c:700 is not reported in this file at all, why? ada-valprint.c:700 is the last line of this extracted code: LONGEST offset; int offset_aligned; const gdb_byte *valaddr; const gdb_byte *ada_aligned_value_addr (struct type *type, const gdb_byte *valaddr); offset_aligned = offset + ada_aligned_value_addr (type, valaddr) - valaddr; Reduced testcase: int main (void) { const char *a = "", *b = ""; int reported, missed; long longvar = 0; reported = longvar; missed = longvar + a - b; return reported + missed; } splint -hints -linelen 999: ../../../t/t.c: (in function main) ../../../t/t.c:5:3: Assignment of long int to int: reported = longvar splint -hints -linelen 999 -checks: ../../../t/t.c: (in function main) ../../../t/t.c:5:3: Assignment of long int to int: reported = longvar ../../../t/t.c:6:22: Pointer arithmetic involving possibly null pointer a: longvar + a splint -hints -linelen 999 -strict: ../../../t/t.c: (in function main) ../../../t/t.c:5:3: Assignment of long int to int: reported = longvar ../../../t/t.c:6:12: Pointer arithmetic (long int, char *): longvar + a ../../../t/t.c:6:22: Pointer arithmetic involving possibly null pointer a: longvar + a ../../../t/t.c:6:12: Operands of - are non-numeric (char *): longvar + a - b These warnings are in fact OK but the problematic assignment of ptrdiff_t to int variable 'missed' is not reported at all. We need to either fix splint or (more likely) use a different tool, there are too many cases missed this way. Regards, Jan