From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#51092: [PATCH] Recognize consteval and constinit modifiers in C++ Date: Tue, 12 Oct 2021 10:54:00 +0000 Message-ID: References: <8735pbrd91.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9819"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51092@debbugs.gnu.org, acm@muc.de, Evan Klitzke To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 13:13:26 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maFin-0002Ni-S1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 13:13:25 +0200 Original-Received: from localhost ([::1]:51366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maFil-0000KD-Il for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 07:13:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFR0-0001kU-73 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 06:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFQz-0002if-Tk for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 06:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maFQz-0004uY-Rq for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 06:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2021 10:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51092 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51092-submit@debbugs.gnu.org id=B51092.163403605218813 (code B ref 51092); Tue, 12 Oct 2021 10:55:01 +0000 Original-Received: (at 51092) by debbugs.gnu.org; 12 Oct 2021 10:54:12 +0000 Original-Received: from localhost ([127.0.0.1]:33610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maFQC-0004tN-0O for submit@debbugs.gnu.org; Tue, 12 Oct 2021 06:54:12 -0400 Original-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 ) id 1maFQ9-0004t5-Ug for 51092@debbugs.gnu.org; Tue, 12 Oct 2021 06:54:10 -0400 Original-Received: (qmail 66698 invoked by uid 3782); 12 Oct 2021 10:54:02 -0000 Original-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 Original-Received: (qmail 8707 invoked by uid 1000); 12 Oct 2021 10:54:00 -0000 Content-Disposition: inline In-Reply-To: <8735pbrd91.fsf@gnus.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217000 Archived-At: Hello, Evan and Lars. On Fri, Oct 08, 2021 at 13:02:02 +0200, Lars Ingebrigtsen wrote: > Evan Klitzke 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).