GNU bug report logs - #51092
[PATCH] Recognize consteval and constinit modifiers in C++

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Evan Klitzke <evan@HIDDEN>; Keywords: patch; dated Fri, 8 Oct 2021 03:24:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 51092 <at> debbugs.gnu.org:


Received: (at 51092) by debbugs.gnu.org; 12 Oct 2021 10:54:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 12 06:54:12 2021
Received: from localhost ([127.0.0.1]:33610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1maFQC-0004tN-0O
	for submit <at> debbugs.gnu.org; Tue, 12 Oct 2021 06:54:12 -0400
Received: from colin.muc.de ([193.149.48.1]:12047 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1maFQ9-0004t5-Ug
 for 51092 <at> debbugs.gnu.org; Tue, 12 Oct 2021 06:54:10 -0400
Received: (qmail 66698 invoked by uid 3782); 12 Oct 2021 10:54:02 -0000
Received: from acm.muc.de (p4fe15ae7.dip0.t-ipconnect.de [79.225.90.231])
 (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Tue, 12 Oct 2021 12:54:02 +0200
Received: (qmail 8707 invoked by uid 1000); 12 Oct 2021 10:54:00 -0000
Date: Tue, 12 Oct 2021 10:54:00 +0000
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#51092: [PATCH] Recognize consteval and constinit modifiers
 in C++
Message-ID: <YWVpSEsVSsTESbOC@ACM>
References: <CAKuwthi3q09pvSuGKR1uU3H_bp-nAoOT-4dR2wVe6vmX9Z+hCA@HIDDEN>
 <8735pbrd91.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8735pbrd91.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 51092
Cc: 51092 <at> debbugs.gnu.org, acm@HIDDEN, Evan Klitzke <evan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Evan and Lars.

On Fri, Oct 08, 2021 at 13:02:02 +0200, Lars Ingebrigtsen wrote:
> Evan Klitzke <evan@HIDDEN> writes:

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

> [...]

> > -  c++  (append '("constexpr" "explicit" "friend" "mutable" "template"
> > -		 "thread_local" "virtual")
> > +  c++  (append '("consteval" "constexpr" "constinit" "explicit"
> > +		 "friend" "mutable" "template" "thread_local" "virtual")

> Makes sense to me; perhaps Alan has some comments, so I've added him to
> the CCs.

As the maintainer of CC Mode, i'm in two minds over this.  It's clearly
a step in the right direction.  But there's a non-trivial amount of work
to be done to implement C++20's new features, and having just those few
new keywords and nothing else in the release branch might jar.

Evan, you've clearly burrowed a fair way into CC Mode, and have some
idea of how complicated it is.  Do you perhaps feel able and willing to
add a larger part of C++20's new feature set to CC Mode?  Regular
discussion and help from me would, of course, be available.  I envisage
starting off in the CC Mode standalone project, and transferring the new
features steadily to the Emacs master branch as they become ready; this
has been my standard way of working for many years.  The standalone
project is at SourceForge, and uses Mercurial (which is easy to learn)
rather than git. 

The copyright assignments are a bit of a hassle.  I think they've still
got to be done on paper.  But for just the patch you've proposed, an
assignment wouldn't be needed.  Richard Stallman has confirmed that the
measure is the number of lines of code added/changed, not the degree of
functionality.  Lars is probably better informed than me about this, and
Eli Zaretskii certainly is.

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51092; Package emacs. Full text available.

Message received at 51092 <at> debbugs.gnu.org:


Received: (at 51092) by debbugs.gnu.org; 8 Oct 2021 11:02:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 08 07:02:14 2021
Received: from localhost ([127.0.0.1]:49316 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mYndl-0006LA-Tq
	for submit <at> debbugs.gnu.org; Fri, 08 Oct 2021 07:02:14 -0400
Received: from quimby.gnus.org ([95.216.78.240]:49796)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mYndj-0006Kw-Sv
 for 51092 <at> debbugs.gnu.org; Fri, 08 Oct 2021 07:02:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=hWQ4ros3LYUV5KXwPUhw1C50FYP8p76mzAOzp4PPvyo=; b=HB2iS3q65/xP0vvkSTIiQJuKd1
 zVDHiSIjaqoIiscB0hHE9trq2MW2ls8HNyQaK1l5DR5SmbImoHO8pc4Thf9N8q+RRmvaaXV3sdD0x
 IcIwGfeuukjLx/unHBd9Fm98oOwCBFacDhadpjIpo6kehDMnp51TJpDgLMXTkexSj9N8=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mYnda-0001H3-Og; Fri, 08 Oct 2021 13:02:05 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Evan Klitzke <evan@HIDDEN>
Subject: Re: bug#51092: [PATCH] Recognize consteval and constinit modifiers
 in C++
References: <CAKuwthi3q09pvSuGKR1uU3H_bp-nAoOT-4dR2wVe6vmX9Z+hCA@HIDDEN>
X-Now-Playing: Suzanne Vega's _Suzanne Vega_: "Cracking"
Date: Fri, 08 Oct 2021 13:02:02 +0200
In-Reply-To: <CAKuwthi3q09pvSuGKR1uU3H_bp-nAoOT-4dR2wVe6vmX9Z+hCA@HIDDEN>
 (Evan Klitzke's message of "Thu, 7 Oct 2021 18:10:24 -0700")
Message-ID: <8735pbrd91.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Evan Klitzke <evan@HIDDEN> writes: > 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 expe [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51092
Cc: 51092 <at> debbugs.gnu.org, Alan Mackenzie <acm@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Evan Klitzke <evan@HIDDEN> writes:

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

[...]

> -  c++  (append '("constexpr" "explicit" "friend" "mutable" "template"
> -		 "thread_local" "virtual")
> +  c++  (append '("consteval" "constexpr" "constinit" "explicit"
> +		 "friend" "mutable" "template" "thread_local" "virtual")

Makes sense to me; perhaps Alan has some comments, so I've added him to
the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51092; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Oct 2021 03:23:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 07 23:23:05 2021
Received: from localhost ([127.0.0.1]:48852 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mYgTQ-0000WX-JU
	for submit <at> debbugs.gnu.org; Thu, 07 Oct 2021 23:23:04 -0400
Received: from lists.gnu.org ([209.51.188.17]:45758)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <evan@HIDDEN>) id 1mYePK-0005cE-O0
 for submit <at> debbugs.gnu.org; Thu, 07 Oct 2021 21:10:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54860)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <evan@HIDDEN>) id 1mYePI-00068X-Um
 for bug-gnu-emacs@HIDDEN; Thu, 07 Oct 2021 21:10:41 -0400
Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:38715)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <evan@HIDDEN>) id 1mYePG-0000YA-RR
 for bug-gnu-emacs@HIDDEN; Thu, 07 Oct 2021 21:10:40 -0400
Received: by mail-lf1-x136.google.com with SMTP id x27so32393282lfu.5
 for <bug-gnu-emacs@HIDDEN>; Thu, 07 Oct 2021 18:10:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eklitzke.org; s=google;
 h=mime-version:from:date:message-id:subject:to;
 bh=BjTwEm8gcLgvhvzFc5tg8PN4F6U4nTQE1SumIc1Z/4w=;
 b=ehp1Vq92fU7J5Rr6iTONcRtG9RbRPUFqb4HYyUNjGokLTQYzewWy5nj5GxiHuXwO8B
 kg6/uKqYU+CaJGjqlWjCeeTiIcEtrtbXVxvqKG+WW38Hlv0/cUA4vn6u+4XN0BF0q4Ol
 MVpSOx3BDYTQf7gSeuROE2RbfPkto1MELQUNA=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=BjTwEm8gcLgvhvzFc5tg8PN4F6U4nTQE1SumIc1Z/4w=;
 b=pJb+joXWsp4GENQ/HABaCftSR6XQrMZSJIVPfKeF+CRQrqgHEhJ0CWk+j5wy5egsbO
 LyEy08LX0nDTDGMh/ZjuK88wom+xtr05bNQNVfzrCUL+riJpYULPlADJ4pcYJb33ga6o
 l9mSl6sn+y2je+z7E6nix1KaBIWw+TwEzUz1ZFVHpF5FwKFk0OlTUdxulaRsWcl68Lpv
 JTT55SuGe/QjxQc7r3+puwIzBeoqg5TIkV9r9B1eJawEfDOiBWQSvCJCR+s1pE1Jj027
 WP+7n5qfOQabt9dsSV6wixaiTzfd1uQLY8r7aSFNAFrnX4kLrbJg6B8966eQZhj/2QYd
 sDbg==
X-Gm-Message-State: AOAM531EyXMoxKtiXA44yz//yIYLxuS7IilS5uZlyIhw34k5+dsZX/iR
 Ecftv48QDi8b+F/Szw9PTs+kaYrv/7bs16UPsU4ZjICOfvk=
X-Google-Smtp-Source: ABdhPJw6qAzGPM5qbp6Sgvf8q+cpseCAY1JTg0ylnfq15gyIJpUCRSUmybOa7eTJ7zmke5N204Oq0RzyGXs+MsZTYU0=
X-Received: by 2002:ac2:5229:: with SMTP id i9mr7428380lfl.493.1633655435601; 
 Thu, 07 Oct 2021 18:10:35 -0700 (PDT)
MIME-Version: 1.0
From: Evan Klitzke <evan@HIDDEN>
Date: Thu, 7 Oct 2021 18:10:24 -0700
Message-ID: <CAKuwthi3q09pvSuGKR1uU3H_bp-nAoOT-4dR2wVe6vmX9Z+hCA@HIDDEN>
Subject: [PATCH] Recognize consteval and constinit modifiers in C++
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/mixed; boundary="000000000000ecea7905cdcd0b9c"
Received-SPF: pass client-ip=2a00:1450:4864:20::136;
 envelope-from=evan@HIDDEN; helo=mail-lf1-x136.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 07 Oct 2021 23:23:03 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000ecea7905cdcd0b9c
Content-Type: text/plain; charset="UTF-8"

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/

--000000000000ecea7905cdcd0b9c
Content-Type: text/x-patch; charset="US-ASCII"; name="consteval.patch"
Content-Disposition: attachment; filename="consteval.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_kuho8b7l0>
X-Attachment-Id: f_kuho8b7l0

Y29tbWl0IDk2OGJjMDFhZWUzNDFkNzY3NDg0ODA3MDE3NjRiMmZiYTA2ODkxMTIgKEhFQUQgLT4g
Y29uc3RldmFsLCBldmFuL2NvbnN0ZXZhbCkKQXV0aG9yOiBFdmFuIEtsaXR6a2UgPGV2YW5AZWts
aXR6a2Uub3JnPgpEYXRlOiAgIFRodSBPY3QgNyAxNzo0NzoyNSAyMDIxIC0wNzAwCgogICAgQWRk
IGNvbnN0ZXZhbCBhbmQgY29uc3Rpbml0IGtleXdvcmRzIChpbnRyb2R1Y2VkIGluIEMrKzIwKQoK
ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL2NjLWxhbmdzLmVsIGIvbGlzcC9wcm9nbW9kZXMv
Y2MtbGFuZ3MuZWwKaW5kZXggNTNmNjIwNmE4Mi4uOGU2OGYwNDRlOCAxMDA2NDQKLS0tIGEvbGlz
cC9wcm9nbW9kZXMvY2MtbGFuZ3MuZWwKKysrIGIvbGlzcC9wcm9nbW9kZXMvY2MtbGFuZ3MuZWwK
QEAgLTI1OTAsOCArMjU5MCw4IEBAIGMtbW9kaWZpZXIta3dkcwogICB0ICAgIG5pbAogICAoYyBj
KyspICcoImV4dGVybiIgImlubGluZSIgInJlZ2lzdGVyIiAic3RhdGljIikKICAgYyAgICAoYXBw
ZW5kICcoImF1dG8iKSAoYy1sYW5nLWNvbnN0IGMtbW9kaWZpZXIta3dkcykpCi0gIGMrKyAgKGFw
cGVuZCAnKCJjb25zdGV4cHIiICJleHBsaWNpdCIgImZyaWVuZCIgIm11dGFibGUiICJ0ZW1wbGF0
ZSIKLQkJICJ0aHJlYWRfbG9jYWwiICJ2aXJ0dWFsIikKKyAgYysrICAoYXBwZW5kICcoImNvbnN0
ZXZhbCIgImNvbnN0ZXhwciIgImNvbnN0aW5pdCIgImV4cGxpY2l0IgorCQkgImZyaWVuZCIgIm11
dGFibGUiICJ0ZW1wbGF0ZSIgInRocmVhZF9sb2NhbCIgInZpcnR1YWwiKQogCSAgICAgICA7OyAi
dXNpbmciIGlzIG5vdyBoYW5kbGVkIHNwZWNpYWxseSAoMjAyMC0wOS0xNCkuCiAJICAgICAgIChj
LWxhbmctY29uc3QgYy1tb2RpZmllci1rd2RzKSkKICAgb2JqYyAnKCJhdXRvIiAiYnljb3B5IiAi
YnlyZWYiICJleHRlcm4iICJpbiIgImlub3V0IiAib25ld2F5IiAib3V0IiAic3RhdGljIikK
--000000000000ecea7905cdcd0b9c--




Acknowledgement sent to Evan Klitzke <evan@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#51092; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 12 Oct 2021 11:00:02 UTC

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