From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121889 invoked by alias); 12 Jan 2019 16:29:25 -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 121876 invoked by uid 89); 12 Jan 2019 16:29:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mailsec110.isp.belgacom.be Received: from mailsec110.isp.belgacom.be (HELO mailsec110.isp.belgacom.be) (195.238.20.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 16:29:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1547310560; x=1578846560; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=L8Wg4M1d2+SYBmaBGCyJL0Pw5XHEGE7tERe1iCsHOKQ=; b=bjNLaXoinQ5A0bdmMBCxDBNaxLtq9qHZjnvi0J1dpy1H/+YHe/GiIbrB OY/E5Ff1og6n1Sz5TA4WriceqmrdXA==; Received: from 184.205-67-87.adsl-dyn.isp.belgacom.be (HELO md) ([87.67.205.184]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 12 Jan 2019 17:29:18 +0100 Message-ID: <1547310557.5979.5.camel@skynet.be> Subject: Re: [RFA 1/3] Use function_name_style to print Ada and C function names From: Philippe Waroquiers To: Tom Tromey Cc: gdb-patches@sourceware.org Date: Sat, 12 Jan 2019 16:29:00 -0000 In-Reply-To: <87bm4lx2v3.fsf@tromey.com> References: <20190110220113.26169-1-philippe.waroquiers@skynet.be> <20190110220113.26169-2-philippe.waroquiers@skynet.be> <87bm4lx2v3.fsf@tromey.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00285.txt.bz2 On Sat, 2019-01-12 at 09:22 -0700, Tom Tromey wrote: > > > > > > "Philippe" == Philippe Waroquiers writes: > > Philippe> * ada-typeprint.c (print_func_type): Print function name > Philippe> style to print function name. > Philippe> * c-typeprint.c (c_print_type_1): Likewise. > > These are printing type names, not function names -- so I wonder whether > we want to apply the function name styling here. > > Any comments on this aspect? I am not sure myself. ada-typeprint.c:print_func_type is only called to print types that are functions. So, that effectively prints a function name. c-typeprint.c (c_print_type_1) is effectively called to print whatever type (so not only functions), but the following added condition should ensure function name style is only used for function names: -      fputs_filtered (varstring, stream); +      if (code == TYPE_CODE_FUNC || code == TYPE_CODE_METHOD) +       fputs_styled (varstring, function_name_style.style (), stream ); +      else +       fputs_filtered (varstring, stream); > > On the one hand, it isn't a function name; maybe we would like a type > style, but then maybe a type style would be too noisy somehow? > > On the other hand, maybe calling out function type names looks nicer. > > Philippe> + fputs_styled (varstring, function_name_style.style (), stream ); > > Extra space before the close paren. I will fix this, once/if a go to push ... Thanks Philippe