From unknown Tue Jun 24 05:09:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22644 <22644@debbugs.gnu.org> To: bug#22644 <22644@debbugs.gnu.org> Subject: Status: CC Mode 5.33 (C++/l); Cache error when editing template Reply-To: bug#22644 <22644@debbugs.gnu.org> Date: Tue, 24 Jun 2025 12:09:03 +0000 retitle 22644 CC Mode 5.33 (C++/l); Cache error when editing template reassign 22644 cc-mode submitter 22644 Michael Welsh Duggan severity 22644 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 12 11:35:15 2016 Received: (at submit) by debbugs.gnu.org; 12 Feb 2016 16:35:15 +0000 Received: from localhost ([127.0.0.1]:38159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUGgc-0004Nn-Nd for submit@debbugs.gnu.org; Fri, 12 Feb 2016 11:35:15 -0500 Received: from md5i.com ([75.151.244.229]:39888) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUGgb-0004Ne-6g for submit@debbugs.gnu.org; Fri, 12 Feb 2016 11:35:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=dnKAiidYT4eJT3ygOsgLYi9P7tSlUCjTG0domraHXY0=; b=QuyRSlHoBynjMyLxt5qmRrEcTb hxe9Kz+lt0/ZvOdcbWOCvOtg2/fIcTuoEBSWvKezye6MyKJHfKf/duAPvYX82rKgqj1IoCEPEBubW N25k2/UXKC362Barx2nSCC+fK; Received: from md5i by md5i.com with local (Exim 4.86) (envelope-from ) id 1aUGga-0003fR-QV for submit@debbugs.gnu.org; Fri, 12 Feb 2016 11:35:12 -0500 From: Michael Welsh Duggan To: submit@debbugs.gnu.org Subject: CC Mode 5.33 (C++/l); Cache error when editing template X-Debbugs-Package: cc-mode Date: Fri, 12 Feb 2016 11:35:11 -0500 Message-ID: <87vb5tga4g.fsf@md5i.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit 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: -0.1 (/) --=-=-= Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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), fro= m scratch: ((706 . 708) 412 (368 . 391) 293) Old state: (setq c-state-cache =92(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-se= mi-nonlit-pos-cache nil c-state-semi-nonlit-pos-cache-limit 802 c-state-b= race-pair-desert =92(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), fro= m scratch: ((706 . 708) 412 (368 . 391) 293) Old state: (setq c-state-cache =92(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-se= mi-nonlit-pos-cache nil c-state-semi-nonlit-pos-cache-limit 802 c-state-b= race-pair-desert =92(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) --=-=-= Content-Type: text/x-c++hdr Content-Disposition: attachment; filename=matchertags.hpp // Copyright 2016 Carnegie Mellon University. See LICENSE file for terms. // Author: Michael Duggan #ifndef _MATCHERTAGS_HPP_ #define _MATCHERTAGS_HPP_ // This file contains base tag and tag/type manipulation definitions for use by matcher.hpp. #include namespace matcher { // A holder for types of any type template struct Types { Types() = delete; }; namespace detail { // Base class for TypedTags, so std::is_base_of() can be used. struct TagBase { // Tags are for type tagging only, and are not constructable TagBase() = delete; }; template using IsTag = std::is_base_of; template struct AreTags : std::true_type {}; template struct AreTags : std::conditional::value, AreTags, std::false_type>::type {}; template struct AreTags> : AreTags {}; } // namespace detail // Base of match tag types. This type holds the following information: // // A) subtags, which is a list of tags that this tag has as arguments. This is used by // detail::CountRef. // B) convertible, which is a list of valid capture types for this node. This is used by the // Matcher> implementation. // template struct TypedTag : detail::TagBase { using subtags = Types; using convertible = RefTypes; }; // A simpler version of TypedTag for nodes that have no tag arguments template using Tag = TypedTag>; // Within this next section are operations on Types<> constructions namespace detail { // Determine if type S is one of the types in Rest. If Rest is Types<...>, then it will // determine if S is one of the types in Types<...>. This will be either std::true_type or // std::false_type. template struct HasType; // Base case : false template struct HasType : std::false_type {}; // Inductive step. true if S == T, recurse on Rest otherwise template struct HasType : std::conditional::value, std::true_type, HasType>::type {}; // Convert HasType> to HasType template struct HasType> : HasType {}; // _TypesInCommon determines what types are in common betwen A and B (with accumulator Acc) template > struct _TypesInCommon; // If A has no types, there are no types left in common. Return the accumulator. template struct _TypesInCommon, B, Acc> { using type = Acc; }; // If A has types, see if the first type in A is in B. If so, add it to the accumulator and // recurse. Otherwise, just recurse. template struct _TypesInCommon, B, Types> { using type = typename std::conditional< HasType::value, typename _TypesInCommon, B, Types>::type, typename _TypesInCommon, B, Types>::type>::type; }; // _TypesInCommonN determines what types are in common between the Types<> argments to // _TypesInCommonN. template struct _TypesInCommonN; // The user-friendly version of _TypesInCommonN (doesn't require ::type) template using TypesInCommon = typename _TypesInCommonN::type; // Base case: if only one set of types is left, return it template struct _TypesInCommonN> { using type = Types; }; // Inductive case: Using the types in common between A and B, recurse on T. template struct _TypesInCommonN { using type = TypesInCommon::type, T...>; }; } // namespace detail } // namespace matcher #endif // _MATCHERTAGS_HPP_ /* Local Variables: */ /* mode: c++ */ /* fill-column: 95 */ /* comment-column: 0 */ /* c-basic-offset: 2 */ /* End: */ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-st= ring-delim gen-comment-delim syntax-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (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 "[ ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-=E2=80=93!|#%= ;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*\\)*\\)" ) --=20 Michael Welsh Duggan (md5i@md5i.com) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 15 16:54:19 2016 Received: (at 22644) by debbugs.gnu.org; 15 Feb 2016 21:54:19 +0000 Received: from localhost ([127.0.0.1]:40524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVR63-0004iE-0l for submit@debbugs.gnu.org; Mon, 15 Feb 2016 16:54:19 -0500 Received: from mail.muc.de ([193.149.48.3]:46234) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVR60-0004i2-6a for 22644@debbugs.gnu.org; Mon, 15 Feb 2016 16:54:17 -0500 Received: (qmail 41375 invoked by uid 3782); 15 Feb 2016 21:54:14 -0000 Received: from acm.muc.de (p548A5384.dip0.t-ipconnect.de [84.138.83.132]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 15 Feb 2016 22:54:13 +0100 Received: (qmail 25353 invoked by uid 1000); 15 Feb 2016 21:56:39 -0000 Date: Mon, 15 Feb 2016 21:56:39 +0000 To: Michael Welsh Duggan Subject: Re: bug#22644: CC Mode 5.33 (C++/l); Cache error when editing template Message-ID: <20160215215639.GD4992@acm.fritz.box> References: <87vb5tga4g.fsf@md5i.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87vb5tga4g.fsf@md5i.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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: 22644 Cc: 22644@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: -0.0 (/) 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@md5i.com) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 17 06:56:40 2016 Received: (at 22644-done) by debbugs.gnu.org; 17 Feb 2016 11:56:40 +0000 Received: from localhost ([127.0.0.1]:38875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aW0im-0000dV-OE for submit@debbugs.gnu.org; Wed, 17 Feb 2016 06:56:40 -0500 Received: from mail.muc.de ([193.149.48.3]:26713) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aW0ik-0000dM-Cd for 22644-done@debbugs.gnu.org; Wed, 17 Feb 2016 06:56:38 -0500 Received: (qmail 6733 invoked by uid 3782); 17 Feb 2016 11:56:37 -0000 Received: from acm.muc.de (p548A48EB.dip0.t-ipconnect.de [84.138.72.235]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 17 Feb 2016 12:56:35 +0100 Received: (qmail 3674 invoked by uid 1000); 17 Feb 2016 11:59:00 -0000 Date: Wed, 17 Feb 2016 11:59:00 +0000 To: Michael Welsh Duggan Subject: Re: bug#22644: CC Mode 5.33 (C++/l); Cache error when editing template Message-ID: <20160217115900.GA3669@acm.fritz.box> References: <87vb5tga4g.fsf@md5i.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vb5tga4g.fsf@md5i.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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: 22644-done Cc: 22644-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: -0.0 (/) Bug fixed. -- Alan Mackenzie (Nuremberg, Germany). From unknown Tue Jun 24 05:09:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Mar 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator