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: Fri, 17 Aug 2018 20:37:07 +0000 Message-ID: <20180817203707.GA6556@ACM> References: <83ftzdgxb1.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1534538528 6597 195.159.176.226 (17 Aug 2018 20:42:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2018 20:42:08 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 32403@debbugs.gnu.org, Mauro Aranda To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 17 22:42:04 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 1fqlZL-0001cp-Jh for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2018 22:42:03 +0200 Original-Received: from localhost ([::1]:36318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqlbR-0003FU-Ra for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2018 16:44:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqlbL-0003FA-QW for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2018 16:44:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqlbH-0001Xh-Qk for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2018 16:44:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fqlbG-0001WS-FP; Fri, 17 Aug 2018 16:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fqlbG-0002QT-96; Fri, 17 Aug 2018 16:44: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: Fri, 17 Aug 2018 20:44: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.15345386269293 (code B ref 32403); Fri, 17 Aug 2018 20:44:02 +0000 Original-Received: (at 32403) by debbugs.gnu.org; 17 Aug 2018 20:43:46 +0000 Original-Received: from localhost ([127.0.0.1]:53787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fqlb0-0002Pp-6D for submit@debbugs.gnu.org; Fri, 17 Aug 2018 16:43:46 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:49003 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1fqlay-0002Pg-Ed for 32403@debbugs.gnu.org; Fri, 17 Aug 2018 16:43:44 -0400 Original-Received: (qmail 12330 invoked by uid 3782); 17 Aug 2018 20:43:43 -0000 Original-Received: from acm.muc.de (p5B147F8E.dip0.t-ipconnect.de [91.20.127.142]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 17 Aug 2018 22:43:41 +0200 Original-Received: (qmail 8636 invoked by uid 1000); 17 Aug 2018 20:37:07 -0000 Content-Disposition: inline In-Reply-To: <83ftzdgxb1.fsf@gnu.org> 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:149561 Archived-At: Hello, Eli. 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. -- Alan Mackenzie (Nuremberg, Germany).