From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32275 invoked by alias); 25 Sep 2012 20:37:22 -0000 Received: (qmail 32216 invoked by uid 22791); 25 Sep 2012 20:37:21 -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, 25 Sep 2012 20:37:08 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8PKb8vi008305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Sep 2012 16:37:08 -0400 Received: from host2.jankratochvil.net (ovpn-113-58.phx2.redhat.com [10.3.113.58]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8PKb4BD018009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 25 Sep 2012 16:37:07 -0400 Date: Tue, 25 Sep 2012 20:37:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: Siddhesh Poyarekar , gdb-patches@sourceware.org Subject: Re: [PATCH] Eliminate local variables to use TYPE_LENGTH directly Message-ID: <20120925203704.GA29051@host2.jankratochvil.net> References: <20120924173542.625d322c@spoyarek> <20120925082558.GA9305@host2.jankratochvil.net> <87fw6526gv.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fw6526gv.fsf@fleche.redhat.com> 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/msg00561.txt.bz2 On Tue, 25 Sep 2012 22:27:44 +0200, Tom Tromey wrote: > Jan> While correct I find this expression too tricky, check_typedef should be > Jan> called rather ahead of some block of code later depending on it. > > I often think we should have TYPE_LENGTH call check_typedef invisibly. > The current situation seems error-prone. It can be very expensive, one should benchmark it. Also in some situations during DWARF reading it may not be safe to call check_typedef (although check_typedef already looks at CURRENTLY_READING_SYMTAB so it may work). Anyway it is outside of the scope of Siddhesh's patch. Thanks, Jan