From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31633 invoked by alias); 12 Jan 2019 22:59:21 -0000 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 Received: (qmail 31621 invoked by uid 89); 12 Jan 2019 22:59:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1007 X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.50.119) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 22:59:19 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 9E25E29F4D for ; Sat, 12 Jan 2019 16:59:18 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id iSFKg5J6F2PzOiSFKginBG; Sat, 12 Jan 2019 16:59:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=i5KlBwYT19XHwJIeHx359AjC2jqeOlpE7s1wB+VOIus=; b=i9TPJyCPlmt56RHAx94kdkULii D25l15PffReia4YTS01ezyH4qDmsa2C+ccTYsIC/3rEbg5w/KJBwljy2b8KYeInSEdomeRjYp2fNn dQSMfa7mYXScAhgJbR8jTzZ3j; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:39698 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1giSFK-003JZ4-D1; Sat, 12 Jan 2019 16:59:18 -0600 From: Tom Tromey To: Philippe Waroquiers Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 1/3] Use function_name_style to print Ada and C function names References: <20190110220113.26169-1-philippe.waroquiers@skynet.be> <20190110220113.26169-2-philippe.waroquiers@skynet.be> <87bm4lx2v3.fsf@tromey.com> <1547310557.5979.5.camel@skynet.be> Date: Sat, 12 Jan 2019 22:59:00 -0000 In-Reply-To: <1547310557.5979.5.camel@skynet.be> (Philippe Waroquiers's message of "Sat, 12 Jan 2019 17:29:17 +0100") Message-ID: <87zhs5trcq.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-01/txt/msg00303.txt.bz2 >>>>> "Philippe" =3D=3D Philippe Waroquiers = writes: Philippe> ada-typeprint.c:print_func_type is only called to print types tha= t are Philippe> functions. So, that effectively prints a function name. No opinion on that one, maybe Joel could say. Philippe> c-typeprint.c (c_print_type_1) is effectively called to print wha= tever Philippe> type (so not only functions), but the following added condition Philippe> should ensure function name style is only used for function names: Philippe> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fputs_filtered (varstring, stream= ); Philippe> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (code =3D=3D TYPE_CODE_FUNC ||= code =3D=3D TYPE_CODE_METHOD) Philippe> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0fputs_styled (varstrin= g, function_name_style.style (), stream ); Philippe> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else Philippe> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0fputs_filtered (varstr= ing, stream); Actually here I wonder if this can be hit. Maybe typedef void Typename (); ... ? But I'd sort of expect not. Tom