From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3727 invoked by alias); 23 Oct 2012 02:37:32 -0000 Received: (qmail 3718 invoked by uid 22791); 23 Oct 2012 02:37:29 -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; Tue, 23 Oct 2012 02:37:22 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9N2bMhT022533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Oct 2012 22:37:22 -0400 Received: from host2.jankratochvil.net (ovpn-116-77.ams2.redhat.com [10.36.116.77]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9N2bIno013942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 22 Oct 2012 22:37:20 -0400 Date: Tue, 23 Oct 2012 02:37:00 -0000 From: Jan Kratochvil To: Siddhesh Poyarekar Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 0/4] bitpos expansion summary reloaded Message-ID: <20121023023717.GA16314@host2.jankratochvil.net> References: <20120929181141.GA4009@host2.jankratochvil.net> <20120930065211.GA21118@host2.jankratochvil.net> <20121003184155.03dceed4@spoyarek> <20121003195627.GA17283@host2.jankratochvil.net> <20121004071314.GA4292@host2.jankratochvil.net> <20121021130546.02ea680c@spoyarek> <87y5iygrrk.fsf@fleche.redhat.com> <20121023013438.GA13413@host2.jankratochvil.net> <20121023015835.GA14007@host2.jankratochvil.net> <20121023075834.130961dc@spoyarek> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121023075834.130961dc@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-10/txt/msg00397.txt.bz2 On Tue, 23 Oct 2012 04:28:34 +0200, Siddhesh Poyarekar wrote: > On Tue, 23 Oct 2012 03:58:35 +0200, Jan wrote: > > The most easy would be to extend to 64-bit any automvaribles handling > > TYPE_LENGTH (and some similar fields also being extended to 64-bit). > > But this would include 64-bit lengths of scalar types which has been > > considered as both performance wasteful and needless work to change > > them all. > > Most of the warnings could be resolved by adding explicit casts > wherever we know for sure that the value is safe to truncate. This would be the case if we want to enable -Wconversion and also we want to keep scalar types with 32-bit only variables. While doable this is the most difficult variant to implement. One has to properly verify all the callers/callees pass only scalar types and also never forget to assert there only a scalar type has been passed - to prevent safety regression with future changes. Thanks, Jan