From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1748 invoked by alias); 3 Mar 2009 00:24:36 -0000 Received: (qmail 1740 invoked by uid 22791); 3 Mar 2009 00:24:36 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Mar 2009 00:24:28 +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 n230ONvQ027129; Mon, 2 Mar 2009 19:24:23 -0500 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 n230ONb7013992; Mon, 2 Mar 2009 19:24:23 -0500 Received: from opsy.redhat.com (vpn-13-145.rdu.redhat.com [10.11.13.145]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n230OMtV005996; Mon, 2 Mar 2009 19:24:23 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 10B458880CE; Mon, 2 Mar 2009 17:24:21 -0700 (MST) To: ppluzhnikov@google.com (Paul Pluzhnikov) Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix unintended fall-through in dump_subexp_body_standard References: <20090303001329.541223A6B9B@localhost> From: Tom Tromey Reply-To: tromey@redhat.com Date: Tue, 03 Mar 2009 00:24:00 -0000 In-Reply-To: <20090303001329.541223A6B9B@localhost> (Paul Pluzhnikov's message of "Mon\, 2 Mar 2009 16\:13\:29 -0800 \(PST\)") 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: 2009-03/txt/msg00025.txt.bz2 >>>>> "Paul" == Paul Pluzhnikov writes: Paul> The code currently in dump_subexp_body_standard() looks "obviously Paul> wrong" to me, but perhaps I am missing something ... I think it is intended. Paul> case TERNOP_SLICE: Paul> case TERNOP_SLICE_COUNT: Paul> elt = dump_subexp (exp, stream, elt); This prints the first element of a node with 3 operands. dump_subexp returns the index of the following element. Then it falls through to the code to print a node with 2 operands. Likewise the 2 operand code falls through to the 1 operand case. Tom