From unknown Thu Aug 14 18:33:18 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#14626 <14626@debbugs.gnu.org> To: bug#14626 <14626@debbugs.gnu.org> Subject: Status: CC Mode 5.32.5 (C++/l); indentation problem involving override Reply-To: bug#14626 <14626@debbugs.gnu.org> Date: Fri, 15 Aug 2025 01:33:18 +0000 retitle 14626 CC Mode 5.32.5 (C++/l); indentation problem involving override reassign 14626 emacs,cc-mode submitter 14626 Michael Welsh Duggan severity 14626 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 15 12:06:51 2013 Received: (at submit) by debbugs.gnu.org; 15 Jun 2013 16:06:51 +0000 Received: from localhost ([127.0.0.1]:46688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Unt06-0006Hc-1N for submit@debbugs.gnu.org; Sat, 15 Jun 2013 12:06:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44831) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Unt03-0006HG-CK for submit@debbugs.gnu.org; Sat, 15 Jun 2013 12:06:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Unszx-0001PB-2c for submit@debbugs.gnu.org; Sat, 15 Jun 2013 12:06:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Unszw-0001P7-Th for submit@debbugs.gnu.org; Sat, 15 Jun 2013 12:06:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Unszv-0004b9-Sl for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 12:06:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Unszu-0001Op-SO for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 12:06:39 -0400 Received: from md5i.com ([75.151.244.229]:50281 helo=maru.md5i.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Unszu-0001OT-N2 for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 12:06:38 -0400 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=EiUWmS7vItjwf8uGy5GA5vvUvPdqQtsc4ZT8N2De4To=; b=lSTIsck3JUJXXpWihIfX4Bl2/7byFO4NcFOTUMPMEqSrXr6aaCJo39+IWdso/ai4PKYJnpLKprLOgIpR0aLJcBMW6xcr90fpl2zcJ6E2lPYxFksQnYac9GoOMMWYQf4a; Received: from md5i by maru.md5i.com with local (Exim 4.80) (envelope-from ) id 1Unszp-0002JB-5x for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 12:06:33 -0400 From: Michael Welsh Duggan To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.32.5 (C++/l); indentation problem involving override X-Reporter-Void-Vars-Found: auto-fill-mode (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 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 '((substatement-open before after) (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 first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont ) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (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 32 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 70 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([ =?utf-8?B?XSpcXChb?= =?utf-8?B?LeKAkyF8IyU7PirCt+KAouKAo+KBg+KXpl0rWw==?= ]*\\)*\\)" ) Date: Sat, 15 Jun 2013 12:06:33 -0400 Message-ID: <8738sjqrxy.fsf@maru.md5i.com> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.1 (----) Date: Sat, 15 Jun 2013 12:03:45 -0400 Message-ID: <87a9mrqs2m.fsf@maru.md5i.com> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) In c++-mode, the following class gets indented correctly: class Foo { Foo foo() const; }; as does this: class Foo { Foo * foo() const; }; and this: class Foo { Foo foo() const override; }; But the following does not: class Foo { Foo * foo() const override; }; Emacs : GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, X toolkit) of 2013-06-11 on maru Package: CC Mode 5.32.5 (C++/l) Buffer Style: gnu c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties 1-bit) current state: ============== -- Michael Welsh Duggan (md5i@md5i.com) From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 16 00:48:22 2013 Received: (at 14626) by debbugs.gnu.org; 16 Jun 2013 04:48:22 +0000 Received: from localhost ([127.0.0.1]:47385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uo4t3-0000q8-Mb for submit@debbugs.gnu.org; Sun, 16 Jun 2013 00:48:22 -0400 Received: from md5i.com ([75.151.244.229]:36219 helo=maru.md5i.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uo4t0-0000pE-H9 for 14626@debbugs.gnu.org; Sun, 16 Jun 2013 00:48:19 -0400 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:In-Reply-To:Date:References:Subject:Cc:To:From; bh=NnCtRMNxYJGf+B1hfXq9/8nj7x5p0EKs6cNILv22yt4=; b=ehC+HZfHhVK296dWW6Ww1EEi3omQBgcaf5+rpfL/epeFrY7COl1wlMMwiB8ki7puXtFG6737Gm8b91FCo0vJMogoDLD0F+zpBIn6WQhoo5cMJlgPM7qoQ2OVOtCg69Ya; Received: from md5i by maru.md5i.com with local (Exim 4.80) (envelope-from ) id 1Uo4ss-0003TP-GQ; Sun, 16 Jun 2013 00:48:10 -0400 From: Michael Welsh Duggan To: Michael Welsh Duggan Subject: Re: bug#14626: CC Mode 5.32.5 (C++/l); indentation problem involving override References: <8738sjqrxy.fsf@maru.md5i.com> Date: Sun, 16 Jun 2013 00:48:10 -0400 In-Reply-To: <8738sjqrxy.fsf@maru.md5i.com> (Michael Welsh Duggan's message of "Sat, 15 Jun 2013 12:06:33 -0400") Message-ID: <87r4g2psol.fsf@maru.md5i.com> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 14626 Cc: 14626@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) Michael Welsh Duggan writes: > Date: Sat, 15 Jun 2013 12:03:45 -0400 > Message-ID: <87a9mrqs2m.fsf@maru.md5i.com> > User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) > > In c++-mode, the following class gets indented correctly: > > class Foo > { > Foo > foo() > const; > }; > > as does this: > > class Foo > { > Foo * > foo() > const; > }; > > and this: > > class Foo > { > Foo > foo() > const > override; > }; > > > But the following does not: > > class Foo > { > Foo * > foo() > const > override; > }; It looks to me that "noexcept", "override", and "final" may need to be added to c-type-modifier-kwds. Or maybe more appropriately in c-type-decl-suffix-key, since they can only appear at the end of a declaration. A brief scan through cc-langs.el shows that there might need to be a few other new c++11 symbols added as well, such as "constexpr". "decltype" might be particularly troublesome, as it is a type that includes an argument in parentheses. Please note that "noexcept", like "throw", can have a parenthetical expression after it. -- Michael Welsh Duggan (md5i@md5i.com) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 00:13:26 2016 Received: (at 14626-done) by debbugs.gnu.org; 22 Aug 2016 04:13:26 +0000 Received: from localhost ([127.0.0.1]:36360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbgc1-00025t-Od for submit@debbugs.gnu.org; Mon, 22 Aug 2016 00:13:25 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:35571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbgc0-00025g-7g for 14626-done@debbugs.gnu.org; Mon, 22 Aug 2016 00:13:24 -0400 Received: by mail-io0-f178.google.com with SMTP id m101so98905495ioi.2 for <14626-done@debbugs.gnu.org>; Sun, 21 Aug 2016 21:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=VhS8S37bidiLc2wdTxqQ1FpZgRCxCM32niVmO3zoj8U=; b=bSDpHx6dBAQE6cEkR1XP+AXxl3xVSLNkJFb5vi/ojLLIQHuR1f+nab7sA+3ue38ctu +X3IjKHMtsmrsLO0teQC7FwkDHhfYE0CA/tHmHoF2vgKVtQK0VrWA82A8+JVXTZWNxq5 k5rg5+5kKu9DFibIAoJnEYPiFL+fauxGXvxxd6/Rv4C80Zj72+gJfZjyAFdO7Y3svNXj /swyWzrxMmurPSMCE2QZaLfIXPL1/KELtOw0Mo3HeNhzG8WNaME35Sia57WLe+Gs/sSh uVbgKy0JnZAyNaJB66Q99udgdHx3wWHuPBNqzUZI2WQWVB1gUIm5q2Mgow4QxAOVnWjf ns2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=VhS8S37bidiLc2wdTxqQ1FpZgRCxCM32niVmO3zoj8U=; b=Yzg0PuMQlK1dKfeFnCQupNBwuB7YTDQ5LICDvvUyYxAP7x/ZY3MKvBhwJrk3s5khU3 dUNVRAH6XMxpggKX2ruuifKJvycTP0dPhN1gb13yTfKMiZpV/au1bY47NWPJzkNw1At9 H3eIQMBjfzwEfT3BaEuyw5IBfJfPis48zLtRsPR/NsjBOSUl4MUyYyWr1ybFkUDFVEhh T+GsxNyhpGMR5DgqlFQrOrECL6xhnv6Wp/2xElMXKpzBHvvE/UXdr9BrMcDg8sjloHbf GqWdP6arUWHeZB8fYm18xtpU/ECNYhrGOXGFcXxMcz0X/+JMqplS1PBQu9z2k9lq3XZq Ex1g== X-Gm-Message-State: AEkoouvuv5I+hnA8qP81qsLtFfW89ISxlDcBt9+wC2aIE68kxcAX6A9uSJYNI6P0D/uVyw== X-Received: by 10.107.18.101 with SMTP id a98mr25195978ioj.116.1471839198601; Sun, 21 Aug 2016 21:13:18 -0700 (PDT) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id e6sm304666ith.0.2016.08.21.21.13.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 21 Aug 2016 21:13:18 -0700 (PDT) From: Alex To: Michael Welsh Duggan Subject: Re: bug#14626: CC Mode 5.32.5 (C++/l); indentation problem involving override References: <8738sjqrxy.fsf@maru.md5i.com> Date: Sun, 21 Aug 2016 22:13:16 -0600 In-Reply-To: <8738sjqrxy.fsf@maru.md5i.com> (Michael Welsh Duggan's message of "Sat, 15 Jun 2013 12:06:33 -0400") Message-ID: <874m6dqw4j.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14626-done Cc: 14626-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.7 (/) Michael Welsh Duggan writes: > Date: Sat, 15 Jun 2013 12:03:45 -0400 > Message-ID: <87a9mrqs2m.fsf@maru.md5i.com> > User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) > > In c++-mode, the following class gets indented correctly: > > class Foo > { > Foo > foo() > const; > }; > > as does this: > > class Foo > { > Foo * > foo() > const; > }; > > and this: > > class Foo > { > Foo > foo() > const > override; > }; > > > But the following does not: > > class Foo > { > Foo * > foo() > const > override; > }; This indents correctly since 24.4. > It looks to me that "noexcept", "override", and "final" may need to be > added to c-type-modifier-kwds. Or maybe more appropriately in > c-type-decl-suffix-key, since they can only appear at the end of a > declaration. A brief scan through cc-langs.el shows that there might > need to be a few other new c++11 symbols added as well, such as > "constexpr". "decltype" might be particularly troublesome, as it is a > type that includes an argument in parentheses. > Please note that "noexcept", like "throw", can have a parenthetical > expression after it. It appears that these keywords (apart from decltype) were added in time for 25.1. decltype appears to be in master. I'm closing the bug due to the above. Please re-open if you disagree. From unknown Thu Aug 14 18:33:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 19 Sep 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