unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51092: [PATCH] Recognize consteval and constinit modifiers in C++
@ 2021-10-08  1:10 Evan Klitzke
  2021-10-08 11:02 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Evan Klitzke @ 2021-10-08  1:10 UTC (permalink / raw)
  To: 51092

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

These two modifiers were introduced by C++20. The change is trivial
but I tested it locally on some code I have that uses these modifiers
and with this change the keywords are recognized as expected. I agree
to copyright assignment to the FSF, etc. Patch against master is
attached; I think this should be backported to the emacs-28 branch as
well.

-- 
evan klitzke
https://eklitzke.org/

[-- Attachment #2: consteval.patch --]
[-- Type: text/x-patch, Size: 966 bytes --]

commit 968bc01aee341d76748480701764b2fba0689112 (HEAD -> consteval, evan/consteval)
Author: Evan Klitzke <evan@eklitzke.org>
Date:   Thu Oct 7 17:47:25 2021 -0700

    Add consteval and constinit keywords (introduced in C++20)

diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 53f6206a82..8e68f044e8 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2590,8 +2590,8 @@ c-modifier-kwds
   t    nil
   (c c++) '("extern" "inline" "register" "static")
   c    (append '("auto") (c-lang-const c-modifier-kwds))
-  c++  (append '("constexpr" "explicit" "friend" "mutable" "template"
-		 "thread_local" "virtual")
+  c++  (append '("consteval" "constexpr" "constinit" "explicit"
+		 "friend" "mutable" "template" "thread_local" "virtual")
 	       ;; "using" is now handled specially (2020-09-14).
 	       (c-lang-const c-modifier-kwds))
   objc '("auto" "bycopy" "byref" "extern" "in" "inout" "oneway" "out" "static")

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-14 12:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-08  1:10 bug#51092: [PATCH] Recognize consteval and constinit modifiers in C++ Evan Klitzke
2021-10-08 11:02 ` Lars Ingebrigtsen
2021-10-12 10:54   ` Alan Mackenzie
2021-10-12 14:13     ` Eli Zaretskii
2021-10-14 18:22     ` Evan Klitzke
2022-09-10  5:19     ` Lars Ingebrigtsen
2022-09-13 17:26       ` Alan Mackenzie
2022-09-14 12:32         ` Lars Ingebrigtsen

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).