GNU bug report logs - #7722
24.0.50; Finding this C++ header file drops emacs into a infinite loop

Previous Next

Packages: cc-mode, emacs;

Reported by: Tassilo Horn <tassilo <at> member.fsf.org>

Date: Fri, 24 Dec 2010 08:23:01 UTC

Severity: serious

Found in version 24.0.50

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 7722 <at> debbugs.gnu.org, Tassilo Horn <tassilo <at> member.fsf.org>
Subject: bug#7722: 24.0.50; Finding this C++ header file drops emacs into a infinite loop
Date: Sun, 13 Feb 2011 15:41:45 -0500
Alan Mackenzie <acm <at> muc.de> writes:

>> Thanks.  This patch doesn't apply cleanly to the emacs-23 branch.
>
> That surprises me.  Would you like me to rework the patch so that it
> does?

I took a stab at it, but I'm not familiar enough with the code to do the
job.  Here's an example of a mismatch.  In your patch, you have:

***************
*** 5486,5492 ****
                           (c-forward-type)
                           (c-forward-syntactic-ws))))))

!                 (setq pos (point))

                 ;; Note: These regexps exploit the match order in \| so
                 ;; that "<>" is matched by "<" rather than "[^>:-]>".
--- 5488,5494 ----
                           (c-forward-type)
                           (c-forward-syntactic-ws))))))

!                 (setq pos (point))    ; e.g. first token inside the '<'

                 ;; Note: These regexps exploit the match order in \| so
                 ;; that "<>" is matched by "<" rather than "[^>:-]>".


but in the branch, the relevant part of the code looks like this:

          ;; Must check for '>' at the very start separately,
          ;; since the regexp below has to avoid ">>" without
          ;; using \\=.
          (forward-char)
          t)

        ;; Note: These regexps exploit the match order in \| so
        ;; that "<>" is matched by "<" rather than "[^>:-]>".

This code was altered during Nathaniel Flath's changes for Java 5
support, back in July, which was (rightly) not committed to the branch:

  revno: 100951
  committer: Alan Mackenzie <acm <at> muc.de>
  branch nick: trunk
  timestamp: Sat 2010-07-31 20:01:08 +0000
  message:
  Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
  Contributed by Nathaniel Flath.

Any suggestions? :-/




This bug report was last modified 14 years and 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.