From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer Date: Sun, 26 Aug 2018 11:25:01 +0000 Message-ID: <20180826112501.GA1867@ACM> References: <83ftzdgxb1.fsf@gnu.org> <20180817203707.GA6556@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1535282592 22059 195.159.176.226 (26 Aug 2018 11:23:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2018 11:23:12 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 32403@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 26 13:23:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftt8O-0005aZ-B4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Aug 2018 13:23:08 +0200 Original-Received: from localhost ([::1]:48717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fttAU-0003ck-Aq for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Aug 2018 07:25:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fttAJ-0003cN-Ow for bug-gnu-emacs@gnu.org; Sun, 26 Aug 2018 07:25:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fttAI-0002SM-O0 for bug-gnu-emacs@gnu.org; Sun, 26 Aug 2018 07:25:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55912) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fttAE-0002P2-BY; Sun, 26 Aug 2018 07:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fttAE-0002No-4Z; Sun, 26 Aug 2018 07:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 26 Aug 2018 11:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32403 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 32403-submit@debbugs.gnu.org id=B32403.15352826669110 (code B ref 32403); Sun, 26 Aug 2018 11:25:02 +0000 Original-Received: (at 32403) by debbugs.gnu.org; 26 Aug 2018 11:24:26 +0000 Original-Received: from localhost ([127.0.0.1]:60930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftt9e-0002Ms-0V for submit@debbugs.gnu.org; Sun, 26 Aug 2018 07:24:26 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:33667 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ftt9b-0002Mi-IY for 32403@debbugs.gnu.org; Sun, 26 Aug 2018 07:24:24 -0400 Original-Received: (qmail 98413 invoked by uid 3782); 26 Aug 2018 11:24:22 -0000 Original-Received: from acm.muc.de (p5B146EC2.dip0.t-ipconnect.de [91.20.110.194]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 26 Aug 2018 13:24:21 +0200 Original-Received: (qmail 1932 invoked by uid 1000); 26 Aug 2018 11:25:01 -0000 Content-Disposition: inline In-Reply-To: <20180817203707.GA6556@ACM> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149752 Archived-At: Hello, Mauro, hello, Eli. On Fri, Aug 17, 2018 at 20:37:07 +0000, Alan Mackenzie wrote: > On Fri, Aug 17, 2018 at 12:24:50 +0300, Eli Zaretskii wrote: > > > From: Mauro Aranda > > > Date: Wed, 8 Aug 2018 17:18:58 -0300 > > > Hello. I'm sending this report here because I tested in GNU Emacs 26.1.50 and the problem is not present. If > > > it belongs to the CC Mode mailing list, please let me know. > > > I run: emacs -Q and visit a C file. > > > Inside a function that doesn't return a pointer, c-display-defun-name works just fine. Example: > > > int > > > dummy_returnint(int ret) > > > { > > > return ret; > > > } > > > Minibuffer displays: dummy_returnint > > > But when the function returns a pointer, c-display-defun-name fails to display the function name in the > > > minibuffer. Example: > > > int * > > > dummy_returnpointertoint(int *ret) > > > { > > > return ret; > > > } > > > Minibuffer displays nothing > > Confirmed. Alan, could you please take a look at this? > Yes, certainly. I've worked out a patch for Mauro's failure case (with > the function's type being a pointer). > Additionally, I've found a couple of edge cases which currently aren't > working right: > struct foo bar = {0, 0}; > returns "struct foo" on C-c C-z. It ought to return "bar"; > struct foo {int a; int b} bar = {0, 0}; > also ought to return "bar". > It shouldn't be too much work to fix these two, too. I hope to have this > done by tomorrow (European time) or, at the latest, on Sunday. I've committed a fix for this to master. It was a bit trickier than I'd anticipated. Mauro, would you please test the fix with your real source code and either confirm to me that the problem has indeed been fixed, or tell me where it's still failing. Thanks! -- Alan Mackenzie (Nuremberg, Germany).