From unknown Sat Jun 21 03:18:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Aug 2018 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32403 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 32403@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.153376094021980 (code B ref -1); Wed, 08 Aug 2018 20:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Aug 2018 20:42:20 +0000 Received: from localhost ([127.0.0.1]:45323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnVHg-0005iR-7h for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:42:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnUvI-00056a-Ex for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:19:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnUvB-00071P-LY for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:19:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fnUvB-00071F-HB for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:19:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnUv9-0002ye-Lw for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2018 16:19:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnUv8-0006zl-1c for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2018 16:19:03 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:44571) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fnUv7-0006ys-Jv for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2018 16:19:01 -0400 Received: by mail-lf1-x136.google.com with SMTP id g6-v6so2478165lfb.11 for ; Wed, 08 Aug 2018 13:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=aghOMPWIdMTQi0iqmzT4P2So9nBeKGc6RI9+dq6X3XM=; b=ddE8Jb7mpod6+EfMjBPzHEO98VAJ0V0lZjkVPomRBvnGjC4D1M/3SdWI2AUogbCiR8 9UezwkVSsJ6o7ayVS00HjN7FRMMCKtPYZHQlN0xA/HP2wj1SqDqQ27RzVYFRLQj0f2zh bNd0fYKeQhRZXFwy8zRynWXlYyUCKIwSJhRMrVmNCs4Esl/ktIH53d5Sfo5r2iK1a8ew vaJGKdX+g4StnCTFjyQQ0BxUeLtr8EptagxEXZhzrK2qrc7/lcoc+rWjKd0MKOvLmg3h S2aJJ12et6b+VnGb8W3+JR7PpV/pDNpj0M5ulscRvA1wAphGou7dgx4pZ/fpy4Y21D4+ YjHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=aghOMPWIdMTQi0iqmzT4P2So9nBeKGc6RI9+dq6X3XM=; b=XLyeBZsmeniFTs+YVH9Nyo1+bgw2B+KznRb3DfNjC9cowCEujWM88VcF5/OOTr41ro KaRMGx6gDnZ9vlumyJAe5Y7lxTCP8VZ4rqDxJUciZ4b6s+nAU7zvbC4eaKhDo5V3p786 hJT40Y4u96DrKzoXc1Vw2gzf1XftQ8j7v0KJ6zBYN5E6WQzLwnYfvlSe+6CnwhT103zH FhGIBVbpdPl5Hf/qptPOtTXJDp4LrGPj+k4igtrMuesBxqWdDPxq0XE7Pswj1tk1trxI bKmHwbeQoeUM+FsuMgYYB6SU4YNuwPCW/kg83p0WFP1qfcJXP6TuwQY/71P7disJ31vs zW0Q== X-Gm-Message-State: AOUpUlHoIT9PREo9dUmCVRaePyLVH9csBC3+gfXbkJJoxyH60rcmVFVQ tE9XkEO2l9F1NmNPuXgZbLVRD1E/9VTvqQI/guv2OwBl X-Google-Smtp-Source: AA+uWPxl4CNOqSWt5WypSSIp/1Lf6FITNRWMOoP1R5iWn55VmtzLZGF78zbBn8HjVIr9Z/eLgekNhOfDkAzd3ZDeLc4= X-Received: by 2002:a19:1586:: with SMTP id 6-v6mr2733388lfv.51.1533759539617; Wed, 08 Aug 2018 13:18:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:ded1:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 13:18:58 -0700 (PDT) From: Mauro Aranda Date: Wed, 8 Aug 2018 17:18:58 -0300 Message-ID: Content-Type: multipart/alternative; boundary="00000000000087a5430572f23815" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Wed, 08 Aug 2018 16:42:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --00000000000087a5430572f23815 Content-Type: text/plain; charset="UTF-8" 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 CC mode version is 5.33.1 in both. In GNU Emacs 27.0.50 (build 2, i686-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-08-08 built on the-blackbeard Repository revision: c85ff212dcd0817b833032650f1d52850e8a3c2e Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 16.04.5 LTS Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LCMS2 Important settings: value of $LANG: es_AR.UTF-8 value of $XMODIFIERS: locale-coding-system: utf-8-unix Major mode: C/*l Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr help-fns radix-tree help-mode emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib misearch multi-isearch jka-compr info easymenu elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 8 144019 19238) (symbols 24 22989 1) (miscs 20 89 398) (strings 16 39537 2547) (string-bytes 1 1168068) (vectors 12 17763) (vector-slots 4 584268 27730) (floats 8 66 344) (intervals 28 4892 66) (buffers 536 16) (heap 1024 29018 999)) --00000000000087a5430572f23815 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello. I'm sending this report here because I tes= ted in GNU Emacs 26.1.50 and the problem is not present. If it belongs to t= he CC Mode mailing list, please let me know.


<= /div>
I run: emacs -Q and visit a C file.

Insi= de a function that doesn't return a pointer, c-display-defun-name works= just fine. Example:

int
dummy_returnint(int ret)
{
= =C2=A0 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)
{
=C2=A0 return ret;
}

Minibu= ffer displays nothing


CC mode version is 5.33.1 in both.

=
In GNU Emacs 27.0.50 (build 2, i686-pc-linux-gnu, GTK+ Version 3.18.9)<= br>=C2=A0of 2018-08-08 built on the-blackbeard
Repository revision: c85f= f212dcd0817b833032650f1d52850e8a3c2e
Windowing system distributor 'T= he X.Org Foundation', version 11.0.11906000
System Description: Ubun= tu 16.04.5 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG IM= AGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 = FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS L= CMS2

Important settings:
=C2=A0 value of $LANG: es_AR.UTF-8
= =C2=A0 value of $XMODIFIERS:
=C2=A0 locale-coding-system: utf-8-unix
Major mode: C/*l

Minor modes in effect:
=C2=A0 tooltip-mode:= t
=C2=A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2= =A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode:= t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-com= position-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compressi= on-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t=C2=A0 abbrev-mode: t

Load-path shadows:
None found.

Fea= tures:
(shadow sort mail-extr help-fns radix-tree help-mode emacsbug mes= sage
rmc puny seq byte-opt gv bytecomp byte-compile cconv dired
dired= -loaddefs format-spec rfc822 mml mml-sec password-cache epa derived
epg = epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode = mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2= 045 ietf-drums mm-util mail-prsvr mail-utils cc-mode
cc-fonts cc-guess c= c-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs cl-loaddefs= cl-lib misearch multi-isearch jka-compr info
easymenu elec-pair time-da= te mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-fl= oat-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd font= set image regexp-opt fringe
tabulated-list replace newcomment text-mode = elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearc= h timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-= core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang=
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932hebrew greek romanian slovak czech european ethiopic indian cyrillic
c= hinese composite charscript charprop case-table epa-hook jka-cmpr-hook
h= elp simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
butto= n faces cus-face macroexp files text-properties overlay sha1 md5
base64 = format env code-pages mule custom widget hashtable-print-readable
backqu= ote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting f= ont-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-p= rocess emacs)

Memory information:
((conses 8 144019 19238)
=C2= =A0(symbols 24 22989 1)
=C2=A0(miscs 20 89 398)
=C2=A0(strings 16 395= 37 2547)
=C2=A0(string-bytes 1 1168068)
=C2=A0(vectors 12 17763)
= =C2=A0(vector-slots 4 584268 27730)
=C2=A0(floats 8 66 344)
=C2=A0(in= tervals 28 4892 66)
=C2=A0(buffers 536 16)
=C2=A0(heap 1024 29018 999= ))

--00000000000087a5430572f23815-- From unknown Sat Jun 21 03:18:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 17 Aug 2018 09:26: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: To: Mauro Aranda , Alan Mackenzie Cc: 32403@debbugs.gnu.org Received: via spool by 32403-submit@debbugs.gnu.org id=B32403.153449791530274 (code B ref 32403); Fri, 17 Aug 2018 09:26:02 +0000 Received: (at 32403) by debbugs.gnu.org; 17 Aug 2018 09:25:15 +0000 Received: from localhost ([127.0.0.1]:53252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fqb0N-0007sE-1i for submit@debbugs.gnu.org; Fri, 17 Aug 2018 05:25:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fqb0K-0007rt-NX for 32403@debbugs.gnu.org; Fri, 17 Aug 2018 05:25:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqb09-0002uj-LW for 32403@debbugs.gnu.org; Fri, 17 Aug 2018 05:25:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqb09-0002ub-Ht; Fri, 17 Aug 2018 05:25:01 -0400 Received: from [176.228.60.248] (port=3366 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fqb09-0008G5-5s; Fri, 17 Aug 2018 05:25:01 -0400 Date: Fri, 17 Aug 2018 12:24:50 +0300 Message-Id: <83ftzdgxb1.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Mauro Aranda on Wed, 8 Aug 2018 17:18:58 -0300) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > 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? From unknown Sat Jun 21 03:18:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer 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: To: Eli Zaretskii Cc: 32403@debbugs.gnu.org, Mauro Aranda Received: via spool by 32403-submit@debbugs.gnu.org id=B32403.15345386269293 (code B ref 32403); Fri, 17 Aug 2018 20:44:02 +0000 Received: (at 32403) by debbugs.gnu.org; 17 Aug 2018 20:43:46 +0000 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 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 Received: (qmail 12330 invoked by uid 3782); 17 Aug 2018 20:43:43 -0000 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 Received: (qmail 8636 invoked by uid 1000); 17 Aug 2018 20:37:07 -0000 Date: Fri, 17 Aug 2018 20:37:07 +0000 Message-ID: <20180817203707.GA6556@ACM> References: <83ftzdgxb1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83ftzdgxb1.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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). From unknown Sat Jun 21 03:18:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer 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: To: Mauro Aranda Cc: 32403@debbugs.gnu.org, Eli Zaretskii Received: via spool by 32403-submit@debbugs.gnu.org id=B32403.15352826669110 (code B ref 32403); Sun, 26 Aug 2018 11:25:02 +0000 Received: (at 32403) by debbugs.gnu.org; 26 Aug 2018 11:24:26 +0000 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 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 Received: (qmail 98413 invoked by uid 3782); 26 Aug 2018 11:24:22 -0000 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 Received: (qmail 1932 invoked by uid 1000); 26 Aug 2018 11:25:01 -0000 Date: Sun, 26 Aug 2018 11:25:01 +0000 Message-ID: <20180826112501.GA1867@ACM> References: <83ftzdgxb1.fsf@gnu.org> <20180817203707.GA6556@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180817203707.GA6556@ACM> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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). From unknown Sat Jun 21 03:18:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 26 Aug 2018 14:41: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: To: Alan Mackenzie Cc: 32403@debbugs.gnu.org, Eli Zaretskii Received: via spool by 32403-submit@debbugs.gnu.org id=B32403.15352944472647 (code B ref 32403); Sun, 26 Aug 2018 14:41:02 +0000 Received: (at 32403) by debbugs.gnu.org; 26 Aug 2018 14:40:47 +0000 Received: from localhost ([127.0.0.1]:33210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftwDf-0000gc-1y for submit@debbugs.gnu.org; Sun, 26 Aug 2018 10:40:47 -0400 Received: from mail-lj1-f180.google.com ([209.85.208.180]:44660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftwDd-0000gO-Lx for 32403@debbugs.gnu.org; Sun, 26 Aug 2018 10:40:46 -0400 Received: by mail-lj1-f180.google.com with SMTP id q127-v6so10277361ljq.11 for <32403@debbugs.gnu.org>; Sun, 26 Aug 2018 07:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=M91M/BGFJqWFk0y0x4A7KvwNIfrOTrEp/YbhtD1Uo1Y=; b=Mz1xZF+iO8p55k7HGeoeJemAx6JSjwY0x+N4WxMdazhDFsOLJX/v4glDGx/UjeCaEl u7ayeVSs6eD2J5dnJlo8NH2y2VDI8NIzosLSeOGm5yFvH7GKmOb2huaxWmHlKgU0LKN8 xE2DO8jnu+r7VNs3MJUcWZ/DAd3qSIqNMKzQIjWKIEV8sD/6IFvcn7Wx6ZHU9/TTXPqy naEI3Fkby378ExBQPF11SU9lBSND5dYzkW3wJ+usbPIIbiU0CIHcML5pZgBjUIgQWfN3 ubx2RQqC6I7COsI6DD1tRI+T1QZngygvEIFmZ83FoT0hv02qPoZhtJIjv+TioE5VM6So NPlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=M91M/BGFJqWFk0y0x4A7KvwNIfrOTrEp/YbhtD1Uo1Y=; b=AruzmrywVSnhnSE9e9TXom55ZQ8lzXZnCFjZVSW62gq6U9S7ZmPWU43sj/G2Ohkod6 enQydW7+KUVCnTklDHZwFrPIoxvfTnX81NN/Oen6EwPkvBOv8tWoZKgCjuDVILBgjLJf dcS6lqQKLSRkuS2LZAPnHSE+b6/FPG2jmokGJIjWLu/zqBJ0wyLzaCGyv00xUJ1m7E7X zJDjNvObQnwmCsOlAgS6tAdOe3zY9Rdlza6friRmdIdv/QwuAoTODGM4C1wd8wtVK+/h nLPBz/DKU43TOlEwLwNOasMvSbUwRWB5d/yd43s5FO2Bhf5kb1g3VoheRWng/qbXS6FW glIQ== X-Gm-Message-State: APzg51BvIvsv14UWVUv3kwMttwNCRecUCtCiE+twGhhQ7eN79/bY9l8A xvZhHmZRQTxfBV/7/ZscQ4y+dWya0Yt1wSU3ZCI= X-Google-Smtp-Source: ANB0VdYQR/5vW45CAkhUQmf95aONFnROKZECfISeF/cavs04Xq4MzOwuHSGsMao6IPjWm/WaJYnJT8j1tS/rMHFupQc= X-Received: by 2002:a2e:5719:: with SMTP id l25-v6mr6074003ljb.125.1535294439581; Sun, 26 Aug 2018 07:40:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:de11:0:0:0:0:0 with HTTP; Sun, 26 Aug 2018 07:40:38 -0700 (PDT) In-Reply-To: <20180826112501.GA1867@ACM> References: <83ftzdgxb1.fsf@gnu.org> <20180817203707.GA6556@ACM> <20180826112501.GA1867@ACM> From: Mauro Aranda Date: Sun, 26 Aug 2018 11:40:38 -0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000b26cf705745797c8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000b26cf705745797c8 Content-Type: text/plain; charset="UTF-8" Hi Alan, The fix works great. Thank you! 2018-08-26 8:25 GMT-03:00 Alan Mackenzie : > 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). > --000000000000b26cf705745797c8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Alan,

The fix works great= .=C2=A0 Thank you!



2018-08-26 8:25 GMT-03:00 Alan Mackenzie <acm@muc= .de>:
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 <maurooaranda@gmail.com>
> > > 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.<= br>
> > > I run: emacs -Q and visit a C file.

> > > Inside a function that doesn't return a pointer, c-displ= ay-defun-name works just fine. Example:

> > > int
> > > dummy_returnint(int ret)
> > > {
> > >=C2=A0 =C2=A0return ret;
> > > }

> > > Minibuffer displays: dummy_returnint

> > > But when the function returns a pointer, c-display-defun-nam= e fails to display the function name in the
> > > minibuffer. Example:

> > > int *
> > > dummy_returnpointertoint(int *ret)
> > > {
> > >=C2=A0 =C2=A0return ret;
> > > }

> > > Minibuffer displays nothing

> > Confirmed.=C2=A0 Alan, could you please take a look at this?

> Yes, certainly.=C2=A0 I've worked out a patch for Mauro's fail= ure case (with
> the function's type being a pointer).

> Additionally, I've found a couple of edge cases which currently ar= en't
> working right:

>=C2=A0 =C2=A0 =C2=A0struct foo bar =3D {0, 0};

> returns "struct foo" on C-c C-z.=C2=A0 It ought to return &q= uot;bar";

>=C2=A0 =C2=A0 =C2=A0struct foo {int a; int b} bar =3D {0, 0};

> also ought to return "bar".

> It shouldn't be too much work to fix these two, too.=C2=A0 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.=C2=A0 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.=C2=A0 Thanks!

--
Alan Mackenzie (Nuremberg, Germany).

--000000000000b26cf705745797c8-- From unknown Sat Jun 21 03:18:02 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Mauro Aranda Subject: bug#32403: closed (Re: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer) Message-ID: References: <20180826162747.GB1867@ACM> X-Gnu-PR-Message: they-closed 32403 X-Gnu-PR-Package: emacs,cc-mode Reply-To: 32403@debbugs.gnu.org Date: Sun, 26 Aug 2018 16:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1535300882-13028-1" This is a multi-part message in MIME format... ------------=_1535300882-13028-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return typ= e is a pointer which was filed against the emacs,cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 32403@debbugs.gnu.org. --=20 32403: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32403 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1535300882-13028-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32403-done) by debbugs.gnu.org; 26 Aug 2018 16:27:10 +0000 Received: from localhost ([127.0.0.1]:33234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftxsc-0003N2-5S for submit@debbugs.gnu.org; Sun, 26 Aug 2018 12:27:10 -0400 Received: from colin.muc.de ([193.149.48.1]:29090 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ftxsa-0003Mu-VX for 32403-done@debbugs.gnu.org; Sun, 26 Aug 2018 12:27:09 -0400 Received: (qmail 6590 invoked by uid 3782); 26 Aug 2018 16:27:07 -0000 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 18:27:06 +0200 Received: (qmail 3188 invoked by uid 1000); 26 Aug 2018 16:27:47 -0000 Date: Sun, 26 Aug 2018 16:27:47 +0000 To: Mauro Aranda Subject: Re: bug#32403: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer Message-ID: <20180826162747.GB1867@ACM> References: <83ftzdgxb1.fsf@gnu.org> <20180817203707.GA6556@ACM> <20180826112501.GA1867@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32403-done Cc: Eli Zaretskii , 32403-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Mauro. On Sun, Aug 26, 2018 at 11:40:38 -0300, Mauro Aranda wrote: > Hi Alan, > The fix works great. Thank you! Thanks for the testing! I'm closing the bug. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1535300882-13028-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 8 Aug 2018 20:42:20 +0000 Received: from localhost ([127.0.0.1]:45323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnVHg-0005iR-7h for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:42:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnUvI-00056a-Ex for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:19:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnUvB-00071P-LY for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:19:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fnUvB-00071F-HB for submit@debbugs.gnu.org; Wed, 08 Aug 2018 16:19:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnUv9-0002ye-Lw for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2018 16:19:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnUv8-0006zl-1c for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2018 16:19:03 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:44571) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fnUv7-0006ys-Jv for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2018 16:19:01 -0400 Received: by mail-lf1-x136.google.com with SMTP id g6-v6so2478165lfb.11 for ; Wed, 08 Aug 2018 13:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=aghOMPWIdMTQi0iqmzT4P2So9nBeKGc6RI9+dq6X3XM=; b=ddE8Jb7mpod6+EfMjBPzHEO98VAJ0V0lZjkVPomRBvnGjC4D1M/3SdWI2AUogbCiR8 9UezwkVSsJ6o7ayVS00HjN7FRMMCKtPYZHQlN0xA/HP2wj1SqDqQ27RzVYFRLQj0f2zh bNd0fYKeQhRZXFwy8zRynWXlYyUCKIwSJhRMrVmNCs4Esl/ktIH53d5Sfo5r2iK1a8ew vaJGKdX+g4StnCTFjyQQ0BxUeLtr8EptagxEXZhzrK2qrc7/lcoc+rWjKd0MKOvLmg3h S2aJJ12et6b+VnGb8W3+JR7PpV/pDNpj0M5ulscRvA1wAphGou7dgx4pZ/fpy4Y21D4+ YjHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=aghOMPWIdMTQi0iqmzT4P2So9nBeKGc6RI9+dq6X3XM=; b=XLyeBZsmeniFTs+YVH9Nyo1+bgw2B+KznRb3DfNjC9cowCEujWM88VcF5/OOTr41ro KaRMGx6gDnZ9vlumyJAe5Y7lxTCP8VZ4rqDxJUciZ4b6s+nAU7zvbC4eaKhDo5V3p786 hJT40Y4u96DrKzoXc1Vw2gzf1XftQ8j7v0KJ6zBYN5E6WQzLwnYfvlSe+6CnwhT103zH FhGIBVbpdPl5Hf/qptPOtTXJDp4LrGPj+k4igtrMuesBxqWdDPxq0XE7Pswj1tk1trxI bKmHwbeQoeUM+FsuMgYYB6SU4YNuwPCW/kg83p0WFP1qfcJXP6TuwQY/71P7disJ31vs zW0Q== X-Gm-Message-State: AOUpUlHoIT9PREo9dUmCVRaePyLVH9csBC3+gfXbkJJoxyH60rcmVFVQ tE9XkEO2l9F1NmNPuXgZbLVRD1E/9VTvqQI/guv2OwBl X-Google-Smtp-Source: AA+uWPxl4CNOqSWt5WypSSIp/1Lf6FITNRWMOoP1R5iWn55VmtzLZGF78zbBn8HjVIr9Z/eLgekNhOfDkAzd3ZDeLc4= X-Received: by 2002:a19:1586:: with SMTP id 6-v6mr2733388lfv.51.1533759539617; Wed, 08 Aug 2018 13:18:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:ded1:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 13:18:58 -0700 (PDT) From: Mauro Aranda Date: Wed, 8 Aug 2018 17:18:58 -0300 Message-ID: Subject: 27.0.50; cc mode: c-display-defun-name doesn't work when return type is a pointer To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="00000000000087a5430572f23815" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 08 Aug 2018 16:42:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --00000000000087a5430572f23815 Content-Type: text/plain; charset="UTF-8" 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 CC mode version is 5.33.1 in both. In GNU Emacs 27.0.50 (build 2, i686-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-08-08 built on the-blackbeard Repository revision: c85ff212dcd0817b833032650f1d52850e8a3c2e Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 16.04.5 LTS Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LCMS2 Important settings: value of $LANG: es_AR.UTF-8 value of $XMODIFIERS: locale-coding-system: utf-8-unix Major mode: C/*l Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr help-fns radix-tree help-mode emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib misearch multi-isearch jka-compr info easymenu elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 8 144019 19238) (symbols 24 22989 1) (miscs 20 89 398) (strings 16 39537 2547) (string-bytes 1 1168068) (vectors 12 17763) (vector-slots 4 584268 27730) (floats 8 66 344) (intervals 28 4892 66) (buffers 536 16) (heap 1024 29018 999)) --00000000000087a5430572f23815 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello. I'm sending this report here because I tes= ted in GNU Emacs 26.1.50 and the problem is not present. If it belongs to t= he CC Mode mailing list, please let me know.


<= /div>
I run: emacs -Q and visit a C file.

Insi= de a function that doesn't return a pointer, c-display-defun-name works= just fine. Example:

int
dummy_returnint(int ret)
{
= =C2=A0 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)
{
=C2=A0 return ret;
}

Minibu= ffer displays nothing


CC mode version is 5.33.1 in both.

=
In GNU Emacs 27.0.50 (build 2, i686-pc-linux-gnu, GTK+ Version 3.18.9)<= br>=C2=A0of 2018-08-08 built on the-blackbeard
Repository revision: c85f= f212dcd0817b833032650f1d52850e8a3c2e
Windowing system distributor 'T= he X.Org Foundation', version 11.0.11906000
System Description: Ubun= tu 16.04.5 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG IM= AGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 = FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS L= CMS2

Important settings:
=C2=A0 value of $LANG: es_AR.UTF-8
= =C2=A0 value of $XMODIFIERS:
=C2=A0 locale-coding-system: utf-8-unix
Major mode: C/*l

Minor modes in effect:
=C2=A0 tooltip-mode:= t
=C2=A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2= =A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode:= t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-com= position-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compressi= on-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t=C2=A0 abbrev-mode: t

Load-path shadows:
None found.

Fea= tures:
(shadow sort mail-extr help-fns radix-tree help-mode emacsbug mes= sage
rmc puny seq byte-opt gv bytecomp byte-compile cconv dired
dired= -loaddefs format-spec rfc822 mml mml-sec password-cache epa derived
epg = epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode = mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2= 045 ietf-drums mm-util mail-prsvr mail-utils cc-mode
cc-fonts cc-guess c= c-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs cl-loaddefs= cl-lib misearch multi-isearch jka-compr info
easymenu elec-pair time-da= te mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-fl= oat-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd font= set image regexp-opt fringe
tabulated-list replace newcomment text-mode = elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearc= h timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-= core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang=
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932hebrew greek romanian slovak czech european ethiopic indian cyrillic
c= hinese composite charscript charprop case-table epa-hook jka-cmpr-hook
h= elp simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
butto= n faces cus-face macroexp files text-properties overlay sha1 md5
base64 = format env code-pages mule custom widget hashtable-print-readable
backqu= ote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting f= ont-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-p= rocess emacs)

Memory information:
((conses 8 144019 19238)
=C2= =A0(symbols 24 22989 1)
=C2=A0(miscs 20 89 398)
=C2=A0(strings 16 395= 37 2547)
=C2=A0(string-bytes 1 1168068)
=C2=A0(vectors 12 17763)
= =C2=A0(vector-slots 4 584268 27730)
=C2=A0(floats 8 66 344)
=C2=A0(in= tervals 28 4892 66)
=C2=A0(buffers 536 16)
=C2=A0(heap 1024 29018 999= ))

--00000000000087a5430572f23815-- ------------=_1535300882-13028-1--