GNU bug report logs - #22644
CC Mode 5.33 (C++/l); Cache error when editing template

Previous Next

Package: cc-mode;

Reported by: Michael Welsh Duggan <mwd <at> md5i.com>

Date: Fri, 12 Feb 2016 16:36:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22644 in the body.
You can then email your comments to 22644 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-cc-mode <at> gnu.org:
bug#22644; Package cc-mode. (Fri, 12 Feb 2016 16:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Welsh Duggan <mwd <at> md5i.com>:
New bug report received and forwarded. Copy sent to bug-cc-mode <at> gnu.org. (Fri, 12 Feb 2016 16:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Welsh Duggan <mwd <at> md5i.com>
To: submit <at> debbugs.gnu.org
Subject: CC Mode 5.33 (C++/l); Cache error when editing template
Date: Fri, 12 Feb 2016 11:35:11 -0500
[Message part 1 (text/plain, inline)]
This recipe is very specific.  Small deviations have caused this not to
trigger for no reason that I can determine.

emacs -Q matchertags.hpp

M-x c-toggle-parse-state-debug RET
C-v C-n C-n C-n C-n C-n C-n C-n        // Should be on std::conditional line
M-f M-f M-f M-f C-f                    // Should be on ::value
M-d ( )

This causes the following output:

c-parse-state inconsistency at 774: using cache: (412 (368 . 391) 293), from scratch: ((706 . 708) 412 (368 . 391) 293)
Old state:
(setq c-state-cache ’(412 (368 . 391) 293)  c-state-cache-good-pos 708  c-state-nonlit-pos-cache nil  c-state-nonlit-pos-cache-limit 802  c-state-semi-nonlit-pos-cache nil  c-state-semi-nonlit-pos-cache-limit 802  c-state-brace-pair-desert ’(412 . 803)  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 711)
c-parse-state inconsistency at 778: using cache: (412 (368 . 391) 293), from scratch: ((706 . 708) 412 (368 . 391) 293)
Old state:
(setq c-state-cache ’(412 (368 . 391) 293)  c-state-cache-good-pos 708  c-state-nonlit-pos-cache nil  c-state-nonlit-pos-cache-limit 802  c-state-semi-nonlit-pos-cache nil  c-state-semi-nonlit-pos-cache-limit 802  c-state-brace-pair-desert ’(412 . 803)  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 774)



[matchertags.hpp (text/x-c++hdr, attachment)]
[Message part 3 (text/plain, inline)]

Emacs  : GNU Emacs 25.0.50.3 (x86_64-pc-linux-gnu, X toolkit)
 of 2016-01-19
Package: CC Mode 5.33 (C++/l)
Buffer Style: Pharos
c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties 1-bit)

current state:
==============
(setq
 c-basic-offset 2
 c-comment-only-line-offset 0
 c-indent-comment-alist '((anchored-comment column . 0) (end-block space . 1)
			  (cpp-end-block space . 2))
 c-indent-comments-syntactically-p nil
 c-block-comment-prefix "* "
 c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+")
			   (other . "//+\\|\\**"))
 c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc)
		       (c-mode . gtkdoc))
 c-cleanup-list '(scope-operator)
 c-hanging-braces-alist '((brace-list-open) (brace-entry-open)
			  (statement-cont) (substatement-open after)
			  (block-close . c-snug-do-while)
			  (extern-lang-open after) (namespace-open after)
			  (module-open after) (composition-open after)
			  (inexpr-class-open after)
			  (inexpr-class-close before) (arglist-cont-nonempty))
 c-hanging-colons-alist nil
 c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist)
 c-backslash-column 48
 c-backslash-max-column 72
 c-special-indent-hook '(c-gnu-impose-minimum)
 c-label-minimum-indentation 1
 c-offsets-alist '((inexpr-class . +)
		   (inexpr-statement . +)
		   (lambda-intro-cont . +)
		   (inlambda . c-lineup-inexpr-block)
		   (template-args-cont c-lineup-template-args +)
		   (incomposition . +)
		   (inmodule . +)
		   (innamespace . +)
		   (inextern-lang . +)
		   (composition-close . 0)
		   (module-close . 0)
		   (namespace-close . 0)
		   (extern-lang-close . 0)
		   (composition-open . 0)
		   (module-open . 0)
		   (namespace-open . 0)
		   (extern-lang-open . 0)
		   (objc-method-call-cont
		    c-lineup-ObjC-method-call-colons
		    c-lineup-ObjC-method-call
		    +
		    )
		   (objc-method-args-cont . c-lineup-ObjC-method-args)
		   (objc-method-intro . [0])
		   (friend . 0)
		   (cpp-define-intro c-lineup-cpp-define +)
		   (cpp-macro-cont . +)
		   (cpp-macro . [0])
		   (inclass . +)
		   (stream-op . c-lineup-streamop)
		   (arglist-cont-nonempty
		    c-lineup-gcc-asm-reg
		    c-lineup-arglist
		    )
		   (arglist-cont c-lineup-gcc-asm-reg 0)
		   (comment-intro
		    c-lineup-knr-region-comment
		    c-lineup-comment
		    )
		   (catch-clause . 0)
		   (else-clause . 0)
		   (do-while-closure . 0)
		   (access-label . -)
		   (case-label . 0)
		   (substatement . +)
		   (statement-case-intro . +)
		   (statement . 0)
		   (brace-entry-open . 0)
		   (brace-list-entry . 0)
		   (brace-list-intro . +)
		   (brace-list-close . 0)
		   (block-close . 0)
		   (block-open . 0)
		   (inher-cont . c-lineup-multi-inher)
		   (inher-intro . +)
		   (member-init-cont . c-lineup-multi-inher)
		   (member-init-intro . +)
		   (annotation-var-cont . +)
		   (annotation-top-cont . 0)
		   (topmost-intro . 0)
		   (knr-argdecl . 0)
		   (func-decl-cont . +)
		   (inline-close . 0)
		   (class-close . 0)
		   (class-open . 0)
		   (defun-block-intro . +)
		   (defun-close . 0)
		   (defun-open . 0)
		   (c . c-lineup-C-comments)
		   (string . c-lineup-dont-change)
		   (topmost-intro-cont . c-lineup-topmost-intro-cont)
		   (brace-list-open . 0)
		   (inline-open . +)
		   (arglist-close . +)
		   (arglist-intro . +)
		   (statement-cont . +)
		   (statement-case-open . 0)
		   (label . 2)
		   (substatement-label . 2)
		   (substatement-open . +)
		   (knr-argdecl-intro . +)
		   (statement-block-intro . +)
		   )
 c-buffer-is-cc-mode 'c++-mode
 c-tab-always-indent t
 c-syntactic-indentation t
 c-syntactic-indentation-in-macros t
 c-ignore-auto-fill '(string cpp code)
 c-auto-align-backslashes t
 c-backspace-function 'backward-delete-char-untabify
 c-delete-function 'delete-char
 c-electric-pound-behavior nil
 c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu"))
 c-enable-xemacs-performance-kludge-p nil
 c-old-style-variable-behavior nil
 defun-prompt-regexp nil
 tab-width 8
 comment-column 0
 parse-sexp-ignore-comments t
 parse-sexp-lookup-properties t
 auto-fill-function nil
 comment-multi-line t
 comment-start-skip "\\(//+\\|/\\*+\\)\\s *"
 fill-prefix nil
 fill-column 95
 paragraph-start "[ 	]*\\(//+\\|\\**\\)[ 	]*$\\|^\f"
 adaptive-fill-mode t
 adaptive-fill-regexp "[ 	]*\\(//+\\|\\**\\)[ 	]*\\([ 	]*\\([-–!|#%;>*·•‣⁃◦]+[ 	]*\\)*\\)"
 )

-- 
Michael Welsh Duggan
(md5i <at> md5i.com)

Information forwarded to bug-cc-mode <at> gnu.org:
bug#22644; Package cc-mode. (Mon, 15 Feb 2016 21:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 22644 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Michael Welsh Duggan <mwd <at> md5i.com>
Cc: 22644 <at> debbugs.gnu.org
Subject: Re: bug#22644: CC Mode 5.33 (C++/l); Cache error when editing template
Date: Mon, 15 Feb 2016 21:56:39 +0000
Hello, Michael.

On Fri, Feb 12, 2016 at 11:35:11AM -0500, Michael Welsh Duggan wrote:
> This recipe is very specific.  Small deviations have caused this not to
> trigger for no reason that I can determine.

I'm afraid I can't reproduce it at all.  My window size on emacs -Q in X
Windows appears to be two lines higher than yours.  So I tried just
starting emacs -Q, then C-x C-f'ing the file, then proceding as in your
recipe.  I still can't get it to trigger the error.  Yet.

> emacs -Q matchertags.hpp

> M-x c-toggle-parse-state-debug RET
> C-v C-n C-n C-n C-n C-n C-n C-n        // Should be on std::conditional line
> M-f M-f M-f M-f C-f                    // Should be on ::value
> M-d ( )

> This causes the following output:

> c-parse-state inconsistency at 774: using cache: (412 (368 . 391) 293), from scratch: ((706 . 708) 412 (368 . 391) 293)
> Old state:
> (setq c-state-cache ’(412 (368 . 391) 293)  c-state-cache-good-pos 708  c-state-nonlit-pos-cache nil  c-state-nonlit-pos-cache-limit 802  c-state-semi-nonlit-pos-cache nil  c-state-semi-nonlit-pos-cache-limit 802  c-state-brace-pair-desert ’(412 . 803)  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 711)
> c-parse-state inconsistency at 778: using cache: (412 (368 . 391) 293), from scratch: ((706 . 708) 412 (368 . 391) 293)
> Old state:
> (setq c-state-cache ’(412 (368 . 391) 293)  c-state-cache-good-pos 708  c-state-nonlit-pos-cache nil  c-state-nonlit-pos-cache-limit 802  c-state-semi-nonlit-pos-cache nil  c-state-semi-nonlit-pos-cache-limit 802  c-state-brace-pair-desert ’(412 . 803)  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 774)

The sad thing there is that the first "old state" shown is already
wrong: seeing as how the previous `c-parse-state' was done with point at
711 (the value of `c-parse-state-point'), it should have recorded the
brace pair at (706 . 708).  I don't know why this didn't show up itself
as an inconsistency.

If I don't manage to make progress, I may well be asking you to run a
changed version of cc-engine.elc which would record every
`c-parse-state' call, not just those generating inconsistencies.

[ .... ]

> -- 
> Michael Welsh Duggan
> (md5i <at> md5i.com)

-- 
Alan Mackenzie (Nuremberg, Germany).




Reply sent to Alan Mackenzie <acm <at> muc.de>:
You have taken responsibility. (Wed, 17 Feb 2016 11:57:02 GMT) Full text and rfc822 format available.

Notification sent to Michael Welsh Duggan <mwd <at> md5i.com>:
bug acknowledged by developer. (Wed, 17 Feb 2016 11:57:02 GMT) Full text and rfc822 format available.

Message #13 received at 22644-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Michael Welsh Duggan <mwd <at> md5i.com>
Cc: 22644-done <at> debbugs.gnu.org
Subject: Re: bug#22644: CC Mode 5.33 (C++/l); Cache error when editing template
Date: Wed, 17 Feb 2016 11:59:00 +0000
Bug fixed.

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 17 Mar 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 100 days ago.

Previous Next


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