From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31369 invoked by alias); 9 Jan 2008 19:26:50 -0000 Received: (qmail 31360 invoked by uid 22791); 9 Jan 2008 19:26:50 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Jan 2008 19:26:30 +0000 Received: (qmail 28919 invoked from network); 9 Jan 2008 19:26:28 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Jan 2008 19:26:28 -0000 To: Thiago Jung Bauermann Cc: gcc-patches , gdb-patches Subject: Re: [libiberty] don't demangle functions named "." References: <1199898911.15225.48.camel@localhost.localdomain> From: Jim Blandy Date: Wed, 09 Jan 2008 19:26:00 -0000 In-Reply-To: <1199898911.15225.48.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Wed, 09 Jan 2008 15:15:11 -0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-01/txt/msg00209.txt.bz2 Thiago Jung Bauermann writes: > @@ -2513,10 +2510,12 @@ iterate_demangle_function (struct work_s > > while (scan[2]) > { > - demangle_function_name (work, mangled, declp, scan); > - success = demangle_signature (work, mangled, declp); > - if (success) > - break; > + if (demangle_function_name (work, mangled, declp, scan)) > + { > + success = demangle_signature (work, mangled, declp); > + if (success) > + break; > + } > > /* Reset demangle state for the next round. */ > *mangled = mangle_init; Why not simply: if (demangle_function_name (work, mangled, declp, scan) && demangle_signature (work, mangled, declp)) break;