unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Nicholas Drozd <nicholasdrozd@gmail.com>
Cc: 36484@debbugs.gnu.org
Subject: bug#36484: c-mode hangs on macro with comment
Date: 4 Jul 2019 13:34:23 -0000	[thread overview]
Message-ID: <20190704133423.88899.qmail__30272.0042689302$1562247346$gmane$org@mail.muc.de> (raw)
In-Reply-To: <mailman.43.1562114299.2688.bug-gnu-emacs@gnu.org>

Hello again, Nicholas.

In article <mailman.43.1562114299.2688.bug-gnu-emacs@gnu.org> you wrote:
> Here's a simple C program:

> #define x /***/5
> int main(void) {
>     return x;
> }

> `gcc -Wall` compiles it without any warnings, but opening it causes
> Emacs to hang, and sometimes even to freeze hard.

> It has something to do with the macro, but I haven't been able to
> figure out exactly what's going on.

There was an infinite loop in c-end-of-macro, now fixed.

[ .... ]

> Running that function under the profiler suggests that the problem is
> in `c-end-of-macro`:

Indeed, so.

[ .... ]

I've committed a patch to the Emacs repository master branch.  Would you
please update your copy of master, and confirm the bug is indeed fixed
(or else, tell me what's still wrong).

> GNU Emacs 27.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
> of 2019-06-30

Thanks for taking the trouble to report this bug, and thanks even more
for making it such an easy to follow report, and doing so much diagnosis
on it.

-- 
Alan Mackenzie (Nuremberg, Germany).






  parent reply	other threads:[~2019-07-04 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  0:36 bug#36484: c-mode hangs on macro with comment Nicholas Drozd
     [not found] ` <mailman.43.1562114299.2688.bug-gnu-emacs@gnu.org>
2019-07-04 10:36   ` Alan Mackenzie
2019-07-04 13:34   ` Alan Mackenzie [this message]
     [not found]   ` <20190704133423.88899.qmail@mail.muc.de>
2019-07-04 17:08     ` Nicholas Drozd
2019-07-17  8:22       ` Alan Mackenzie
2019-07-17 13:29         ` Nicholas Drozd
2019-07-17 14:32           ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20190704133423.88899.qmail__30272.0042689302$1562247346$gmane$org@mail.muc.de' \
    --to=acm@muc.de \
    --cc=36484@debbugs.gnu.org \
    --cc=nicholasdrozd@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).