From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24289 invoked by alias); 30 Oct 2008 21:48:46 -0000 Received: (qmail 24045 invoked by uid 22791); 30 Oct 2008 21:48:44 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 30 Oct 2008 21:46:44 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m9UK7Y2s001619; Thu, 30 Oct 2008 16:07:35 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m9UK7Xro024625; Thu, 30 Oct 2008 16:07:33 -0400 Received: from opsy.redhat.com (vpn-12-180.rdu.redhat.com [10.11.12.180]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m9UK7Wme026084; Thu, 30 Oct 2008 16:07:33 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 3B70D3786F5; Thu, 30 Oct 2008 14:07:32 -0600 (MDT) To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: RFA: fix crash in expression evaluation References: <20081030035443.GB13387@adacore.com> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Thu, 30 Oct 2008 21:50:00 -0000 In-Reply-To: <20081030035443.GB13387@adacore.com> (Joel Brobecker's message of "Wed\, 29 Oct 2008 20\:54\:43 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-10/txt/msg00711.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Tom> + struct type *type; Joel> Nit-picking. I think that the general convention here is to separate Joel> local declarations from the rest of the block with an empty line. Ok, fixed. Joel> I don't think the second line is useful, is it? type should Joel> necessarily be a TYPE_CODE_PTR, if I understand Joel> value_coerce_array correctly. So it goes from being a Joel> TYPE_CODE_ARRAY to a TYPE_CODE_PTR. In neither case will it Joel> cause the check just below to be true. Yeah, good point. Joel> Honestly, I think that the code is poorly written. How about using Joel> a case statement or at least a if/else if sequence. Would something Joel> like this work? Looks good to me. I'll send it through the tester. Tom