GNU bug report logs - #72263
31.0.50; Wrong indentation c++-ts-mode

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: Ergus <spacibba@HIDDEN>; dated Wed, 24 Jul 2024 00:03:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 72263) by debbugs.gnu.org; 25 Jul 2024 07:54:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 25 03:54:39 2024
Received: from localhost ([127.0.0.1]:35468 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sWtJ9-0005yI-FI
	for submit <at> debbugs.gnu.org; Thu, 25 Jul 2024 03:54:39 -0400
Received: from mail-pf1-f173.google.com ([209.85.210.173]:45161)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1sWtJ7-0005y9-Ck
 for 72263 <at> debbugs.gnu.org; Thu, 25 Jul 2024 03:54:38 -0400
Received: by mail-pf1-f173.google.com with SMTP id
 d2e1a72fcca58-70d18d4b94cso511774b3a.2
 for <72263 <at> debbugs.gnu.org>; Thu, 25 Jul 2024 00:54:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1721894009; x=1722498809; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=yDz08HHb0XykTwaHBDOedmf+QmGfSBc9Ozc7edConb0=;
 b=b3vr/veu2ECVdy0noTkpk4YMSGIgprT6ACMzCE8FcVGJ4WE/OCjNwG77N6PLUhcDKR
 LuPMn5ws19T8vG7VZLnb249RfZRs9ApzqMQd851QWx6MA+8HICk9XKdzwifwMTwrHEYU
 9JgYnNUG1YPzOHkham8djDR4Ryj6wqVq/dEuvio4gBgRwHmucJrr/dqJEwlKuDHVHln8
 /vA7CXiR4mqyObaxjsL1nbi5UCoks4UFF0wSiooEC/tCoHFyXzEcMNny9iAqeLLXb47G
 bXltzUbGRknyD1L+ZS0LyUpjP51gn+3dwkTOKCOOheQmr/VdYTap/+I54qT3XF3NTG5O
 27kQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1721894009; x=1722498809;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=yDz08HHb0XykTwaHBDOedmf+QmGfSBc9Ozc7edConb0=;
 b=eYXMA4aV/WhdFcGfYzX0KW/oTVhD4t40hrcBtrZZK/bAUz+MjVGR9ZVLJ39t3msSOI
 9H24I+LpTOHr0ScBuFhEJ1+peB1ukoSHF1NLMcJ09ecxFuxYg9sTjnpszplT0UlR/oFq
 EWeE0gD/U97E/cSp52svcj2Uvocn7Wpnc206FvnpJ5grjLVO8pc0CC6BzHQdZPTII9rk
 Z2DlBJkbbJZ7HC59VZO6EHpjxNIRa/bKz+O0S4CqO3GP9t8EJ8ElBykiWVVJqbS6Wvqi
 JlkyUuegzhunKjGp6hIev/k9q4AeaU6+q4oHb7CWHRV8vYti7b3y94RwzdyxtMLNRkNC
 9JAA==
X-Forwarded-Encrypted: i=1;
 AJvYcCUqoEMyt62DcJG4C3gyLCVUbyGUkzxFx5SBMD1pgMNSpvgWSHKS8i3mqKd01lhqvP/PJVaD2iyC4wCuzEQe2LRLVIzE78E=
X-Gm-Message-State: AOJu0YxMQ+5mtN1p+ANqJwpMVEY8hABj7rn/YAcQqgOWVDv4Wf9wtcnC
 6C0JL0f+C99B680MnLldnnVvhRc7cLjLWok6taSxDrU31XpawgEMJU3Ocg==
X-Google-Smtp-Source: AGHT+IEc49U/HqVhH8AHXrmzGIBvi5vwChUuNvClglKFajrUkg5wmsyr4t/6NC3S2M2aU6BDaJEh4A==
X-Received: by 2002:a05:6a00:928a:b0:705:c0a1:61c9 with SMTP id
 d2e1a72fcca58-70eaa88c6fdmr2263408b3a.9.1721894009526; 
 Thu, 25 Jul 2024 00:53:29 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:6120:f9a7:9274:d0c2:c842])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-70ead6e188asm635821b3a.41.2024.07.25.00.53.28
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 25 Jul 2024 00:53:28 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\))
Subject: Re: bug#72263: 31.0.50; Wrong indentation c++-ts-mode
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <86h6ce53pw.fsf@HIDDEN>
Date: Thu, 25 Jul 2024 00:53:16 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <C49953B4-5FFC-41D7-AF4E-3343023B1F0E@HIDDEN>
References: <87cyn3vequ.fsf.ref@HIDDEN> <87cyn3vequ.fsf@HIDDEN>
 <86h6ce53pw.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3774.600.62)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72263
Cc: Ergus <spacibba@HIDDEN>, 72263 <at> debbugs.gnu.org
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 (-)



> On Jul 25, 2024, at 12:29=E2=80=AFAM, Eli Zaretskii <eliz@HIDDEN> =
wrote:
>=20
>> Date: Wed, 24 Jul 2024 02:02:33 +0200
>> From:  Ergus via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>=20
>> When using c++-ts-mode there is an indentation issue apparently =
related
>> with namespaces+templates.
>>=20
>> c-ts-mode-indent-style 'linux (but with 'gnu also happens)
>>=20
>> ```
>> namespace A {
>>=20
>> T myfunction1(const char *fname)
>> {
>> }
>>=20
>> template <class T>
>> T myfunction2(const char *fname)
>> {
>> }
>>=20
>> }
>> ```
>>=20
>> The myfunction2 may be indented as expected, but it is not.
>>=20
>> The explorer shows:
>>=20
>> ```
>> (translation_unit
>> (namespace_definition namespace name: (namespace_identifier)
>>  body:=20
>>   (declaration_list {
>>    (function_definition type: (primitive_type)
>>     declarator:=20
>>      (function_declarator declarator: (identifier)
>>       parameters:=20
>> (parameter_list (
>> (parameter_declaration
>>  (type_qualifier const)
>>  type: (primitive_type)
>>  declarator: (pointer_declarator * declarator: (identifier)))
>> )))
>>     body: (compound_statement { }))
>>    (template_declaration template
>>     parameters:=20
>>      (template_parameter_list <
>>       (type_parameter_declaration class (type_identifier))
>>> )
>>     (function_definition type: (type_identifier)
>>      declarator:=20
>>       (function_declarator declarator: (identifier)
>> parameters:=20
>> (parameter_list (
>>  (parameter_declaration
>>   (type_qualifier const)
>>   type: (primitive_type)
>>   declarator: (pointer_declarator * declarator: (identifier)))
>>  )))
>>      body: (compound_statement { })))
>>    })))
>> ```
>=20
> Yuan, can you take a look, please?

Yeah let me take a look.

Yuan=




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

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


Received: (at 72263) by debbugs.gnu.org; 25 Jul 2024 07:30:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 25 03:30:12 2024
Received: from localhost ([127.0.0.1]:35401 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sWsvT-0005Kg-Ng
	for submit <at> debbugs.gnu.org; Thu, 25 Jul 2024 03:30:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52040)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sWsvS-0005JH-0E
 for 72263 <at> debbugs.gnu.org; Thu, 25 Jul 2024 03:30:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sWsvE-0005jL-DL; Thu, 25 Jul 2024 03:29:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=wra+qjXTZku49/1YCEGwbSqoWLieXIhKqDP1kAoBphs=; b=qLYADyBP/Bw9
 sa7kYwuX3aY00qaUME03EfrxxESVIxVv/iuZNeJF19WXKBriB0VIAlaJYeInoJosv9lnrR5whUjtR
 zbTvvggIY0hV83fm4hKyNjyWUkx+4JHBbOpG4+JBkqoMr4jCWe6Ao+SoLdQaJKdL5Q9sr21i2M1PQ
 kYRwKRNUR9f4936znGFKmv5SGqTXFcT83lJChcZ9vuvWYxVpLLcuxjZVCbfAUU/WdvxlnGKrFGAgC
 sOpiZCdUkKN8QewnXwgioBF4d38l7y6xsAE12Rq4ehsVYeZIT0POrIBRJz4DEzV+Tq7Zuw4z9uAQA
 wQ1QQE2nla76gkFBY0rw4A==;
Date: Thu, 25 Jul 2024 10:29:47 +0300
Message-Id: <86h6ce53pw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>, Yuan Fu <casouri@HIDDEN>
In-Reply-To: <87cyn3vequ.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#72263: 31.0.50; Wrong indentation c++-ts-mode
References: <87cyn3vequ.fsf.ref@HIDDEN> <87cyn3vequ.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72263
Cc: 72263 <at> debbugs.gnu.org
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 (---)

> Date: Wed, 24 Jul 2024 02:02:33 +0200
> From:  Ergus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> When using c++-ts-mode there is an indentation issue apparently related
> with namespaces+templates.
> 
> c-ts-mode-indent-style 'linux (but with 'gnu also happens)
> 
> ```
> namespace A {
> 
> 	T myfunction1(const char *fname)
> 	{
> 	}
> 
> 	template <class T>
> T myfunction2(const char *fname)
> {
> }
> 
> }
> ```
> 
> The myfunction2 may be indented as expected, but it is not.
> 
> The explorer shows:
> 
> ```
> (translation_unit
>  (namespace_definition namespace name: (namespace_identifier)
>   body: 
>    (declaration_list {
>     (function_definition type: (primitive_type)
>      declarator: 
>       (function_declarator declarator: (identifier)
>        parameters: 
> 	(parameter_list (
> 	 (parameter_declaration
> 	  (type_qualifier const)
> 	  type: (primitive_type)
> 	  declarator: (pointer_declarator * declarator: (identifier)))
> 	 )))
>      body: (compound_statement { }))
>     (template_declaration template
>      parameters: 
>       (template_parameter_list <
>        (type_parameter_declaration class (type_identifier))
>        >)
>      (function_definition type: (type_identifier)
>       declarator: 
>        (function_declarator declarator: (identifier)
> 	parameters: 
> 	 (parameter_list (
> 	  (parameter_declaration
> 	   (type_qualifier const)
> 	   type: (primitive_type)
> 	   declarator: (pointer_declarator * declarator: (identifier)))
> 	  )))
>       body: (compound_statement { })))
>     })))
> ```

Yuan, can you take a look, please?




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

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


Received: (at submit) by debbugs.gnu.org; 24 Jul 2024 00:03:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 23 20:03:01 2024
Received: from localhost ([127.0.0.1]:32775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sWPTA-0003mm-Rl
	for submit <at> debbugs.gnu.org; Tue, 23 Jul 2024 20:03:01 -0400
Received: from lists.gnu.org ([209.51.188.17]:54406)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1sWPT8-0003mc-Bi
 for submit <at> debbugs.gnu.org; Tue, 23 Jul 2024 20:02:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spacibba@HIDDEN>) id 1sWPT2-0003DM-H9
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jul 2024 20:02:52 -0400
Received: from sonic314-14.consmr.mail.bf2.yahoo.com ([74.6.132.124])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <spacibba@HIDDEN>) id 1sWPSz-0007yg-J7
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jul 2024 20:02:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1721779366; bh=euWRla/pxFhRlkEAvO/Kd5L/EWMpo/wSVW4wNPPY02Y=;
 h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To;
 b=UsPWRQVPw6k5y/wFNPadI+wMCyWXqGUhP5v/2wNkYU10GK5ERSF0MFi1KqsPbxCpg/tN87lqBQ1URJwCTts/OOVVII4INxDVepL8t0QVQeTiAWg7iSH72RjYaHOqao+e+amGFJw4S74Z1pvqerwom7gMsaBPnj2BnfgVZAIqoqbhtTZGbUCwhYt/rG5MJkf+xvxtopOSfvbsZJLaG4oiB5W5f6pb1iFjTiPp2eLZpvdU7Zk+SHQY3pOCRxOUo9n8zSKbIonTuFwA5Ft3Ca9GCUWeLFsjRkLbJoifAZlOcogyMLX7wHTcXWmYpOt7w8chdmaQed9uehb4ojg3w2zptA==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1721779366; bh=1M4pEzCTPN/tau0eR6kM3yFRE7ErRPHhg+Hla4QFNJB=;
 h=X-Sonic-MF:From:To:Subject:Date:From:Subject;
 b=nAjxoopDpVOCJ3UzbL+mOFNjts0ttq2A/Cp735m6xNIaoJVimSWok4fl4IbrRLwk10ZpF+lDEP3ypEYi5Ikk2r5huxo3F1WT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1d1X3O_gBYWL6Zs.g1s1HNC9.BKrDbb_v
 kutMtlmjM.XnNMopy2Irz3DdP7B3ecgHwgIT27GFUXZvJPyBaUlCwKaEEYlh38U8y8k7Sg4odg9I
 DdXkSxFPSsp1k3Nwu11yalOsxJqFPIYuOre2C9mU77wyxtQXNKDuhFeqI1zRtevTYq.l7UYcS3Ch
 3zQSkjQrZd.RzWXDVz2hXp5.pcmk.TO0YczvHQFBTzb_mcRASglD8GJkkgATmqsfbeMrS203n0I9
 5rTolKbbqLjRkCXcwmHwhNgaXArdDXLvSbmMNFZb7NZmrGowAUEZQe8N8TLkTQPNTbLgcx7jlHdT
 7CLgDaRtamsDfrm47Pi6muqLlFkb367EBebG35fC8v2AoRhXzqNQTZ.VrxPU1er3mVETzQasLbiP
 w
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: 91b83ab9-4857-436a-8856-70ed23173234
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic314.consmr.mail.bf2.yahoo.com with HTTP; Wed, 24 Jul 2024 00:02:46 +0000
Received: by hermes--production-ir2-57d49df6b5-sjcvz (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID af539c29b80993b8e6b7f9850ed9a936; 
 Wed, 24 Jul 2024 00:02:44 +0000 (UTC)
From: Ergus <spacibba@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; Wrong indentation c++-ts-mode
X-Debbugs-Cc: 
Date: Wed, 24 Jul 2024 02:02:33 +0200
Message-ID: <87cyn3vequ.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
References: <87cyn3vequ.fsf.ref@HIDDEN>
X-Mailer: WebService/1.1.22501
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 9798
Received-SPF: pass client-ip=74.6.132.124; envelope-from=spacibba@HIDDEN;
 helo=sonic314-14.consmr.mail.bf2.yahoo.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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
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.6 (--)


Hi:

When using c++-ts-mode there is an indentation issue apparently related
with namespaces+templates.

c-ts-mode-indent-style 'linux (but with 'gnu also happens)

```
namespace A {

	T myfunction1(const char *fname)
	{
	}

	template <class T>
T myfunction2(const char *fname)
{
}

}
```

The myfunction2 may be indented as expected, but it is not.

The explorer shows:

```
(translation_unit
 (namespace_definition namespace name: (namespace_identifier)
  body: 
   (declaration_list {
    (function_definition type: (primitive_type)
     declarator: 
      (function_declarator declarator: (identifier)
       parameters: 
	(parameter_list (
	 (parameter_declaration
	  (type_qualifier const)
	  type: (primitive_type)
	  declarator: (pointer_declarator * declarator: (identifier)))
	 )))
     body: (compound_statement { }))
    (template_declaration template
     parameters: 
      (template_parameter_list <
       (type_parameter_declaration class (type_identifier))
       >)
     (function_definition type: (type_identifier)
      declarator: 
       (function_declarator declarator: (identifier)
	parameters: 
	 (parameter_list (
	  (parameter_declaration
	   (type_qualifier const)
	   type: (primitive_type)
	   declarator: (pointer_declarator * declarator: (identifier)))
	  )))
      body: (compound_statement { })))
    })))
```



In GNU Emacs 31.0.50 (build 15, x86_64-pc-linux-gnu, GTK+ Version
 3.24.43, cairo version 1.18.0) of 2024-07-21 built on RTX
Repository revision: cb0f25e4f966a53d52db5190d189ae85c7154d70
Repository branch: project
System Description: Arch Linux

Configured using:
 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-pgtk
 --with-modules --with-cairo --with-harfbuzz
 --with-native-compilation=aot
 '--program-transform-name=s/^ctags$/ctags.emacs/''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: C++//

Minor modes in effect:
  fancy-compilation-mode: t
  global-auto-revert-mode: t
  electric-pair-mode: t
  whitespace-mode: t
  flyspell-mode: t
  completion-preview-mode: t
  diff-hl-margin-local-mode: t
  diff-hl-margin-mode: t
  diff-hl-mode: t
  corfu-terminal-mode: t
  global-corfu-mode: t
  corfu-mode: t
  project-multi-mode: t
  gtags-mode: t
  repeat-mode: t
  xterm-mouse-mode: t
  xclip-mode: t
  override-global-mode: t
  winner-mode: t
  save-place-mode: t
  delete-selection-mode: t
  savehist-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  which-key-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/mnt/casa/gits/emacs_clones/cuda-mode/cuda-mode hides /home/ergo/.config/emacs/elpa/cuda-mode-20240716.1936/cuda-mode
/mnt/casa/gits/emacs_clones/gtags-mode/gtags-mode hides /home/ergo/.config/emacs/elpa/gtags-mode-1.8/gtags-mode
/home/ergo/.config/emacs/elpa/transient-20240713.2102/transient hides /home/ergo/.local/share/emacs/31.0.50/lisp/transient

Features:
(shadow sort gnus-cite shr-color color qp mail-extr textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check gnus-async
gnus-bcklg gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp
gnus-ml gnus-msg nndoc gnus-cache url-handlers gnus-dup gnus-art mm-uu
mml2015 mm-view mml-smime smime dig gnus-sum shr pixel-fill kinsoku
url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus
gnus-cloud nnimap nnmail browse-url mail-source utf7 nnoo parse-time
iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader range
wid-edit misearch multi-isearch mule-util mm-archive gnutls
network-stream url-cache fancy-compilation compile comint ansi-osc
ansi-color comp-run comp-common crm debbugs-gnu add-log debbugs-compat
debbugs soap-client url-http url-auth url-gw nsm url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util warnings rng-xsd rng-dt rng-util
xsd-regexp xml emacsbug message mailcap yank-media puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils autorevert filenotify ffap
thingatpt url-parse auth-source eieio eieio-core icons password-cache
json map url-vars elec-pair whitespace flyspell-correct flyspell ispell
completion-preview diff-hl-margin diff-hl-dired citre-lang-fileref
citre-tags citre-ctags citre-readtags citre-readtags-tables
citre-backend-interface citre-common-tag rx citre-common-util dired-x
dired dired-loaddefs diff-hl log-view pcvs-util vc-dir ewoc vc
vc-dispatcher diff-mode track-changes corfu-terminal popon corfu
project-multi-mode gtags-mode cl-macs subr-x files-x xref project
c++-ts-mode c-ts-mode c-ts-common treesit term/tmux term/xterm xterm
init repeat cape compat use-package-ensure use-package-diminish xt-mouse
xclip edmacro kmacro byte-opt gv use-package-bind-key bind-key cl-extra
help-mode simple-16-theme winner ring saveplace delsel savehist
easy-mmode display-fill-column-indicator display-line-numbers diminish
which-key cl-seq use-package-core cl-loaddefs cl-lib bytecomp
byte-compile disp-table info 0blayout-autoloads ac-emoji-autoloads
ac-haskell-process-autoloads ac-html-autoloads
arduino-cli-mode-autoloads auctex-autoloads tex-site
auto-complete-autoloads avy-zap-autoloads avy-autoloads
better-shell-autoloads caml-autoloads cape-autoloads citre-autoloads
clang-format-autoloads cobol-mode-autoloads compile-multi-autoloads
corfu-terminal-autoloads corfu-autoloads crdt-autoloads
csv-mode-autoloads cuda-mode-autoloads d-mode-autoloads
deadgrep-autoloads debbugs-autoloads diff-hl-autoloads
diminish-autoloads dired-sidebar-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads dumb-jump-autoloads e2ansi-autoloads
emamux-autoloads esup-autoloads evil-collection-autoloads
annalist-autoloads evil-leader-autoloads evil-autoloads
face-explorer-autoloads fancy-compilation-autoloads flx-autoloads
flycheck-julia-autoloads flycheck-rust-autoloads flycheck-autoloads
flymake-nasm-autoloads flymake-quickdef-autoloads
flyspell-correct-autoloads git-modes-autoloads git-timemachine-autoloads
gnuplot-autoloads google-c-style-autoloads goto-chg-autoloads
groovy-mode-autoloads gtags-mode-autoloads haskell-mode-autoloads
highlight-indent-guides-autoloads i3wm-config-mode-autoloads
ibuffer-sidebar-autoloads iedit-autoloads imenu-list-autoloads
julia-ts-mode-autoloads julia-mode-autoloads languagetool-autoloads
lice-autoloads lorem-ipsum-autoloads lua-mode-autoloads magit-autoloads
git-commit-autoloads magit-section-autoloads markdown-mode-autoloads
modern-cpp-font-lock-autoloads move-dup-autoloads
multiple-cursors-autoloads mutt-mode-autoloads nasm-mode-autoloads
neotree-autoloads nftables-mode-autoloads nginx-mode-autoloads
notmuch-autoloads objed-autoloads opencl-mode-autoloads
paradox-autoloads phi-search-autoloads pkg-info-autoloads epl-autoloads
pkgbuild-mode-autoloads platformio-mode-autoloads async-autoloads
popon-autoloads popup-autoloads projectile-autoloads
projection-autoloads protobuf-mode-autoloads protobuf-ts-mode-autoloads
ptemplate-templates-autoloads ptemplate-autoloads scopeline-autoloads
shell-command+-autoloads slime-autoloads macrostep-autoloads
sphinx-mode-autoloads f-autoloads dash-autoloads s-autoloads
spinner-autoloads ssh-config-mode-autoloads string-inflection-autoloads
sudo-edit-autoloads systemd-autoloads tmux-mode-autoloads
transient-autoloads tsc-autoloads urgrep-autoloads vdiff-autoloads
hydra-autoloads lv-autoloads vterm-toggle-autoloads vterm-autoloads
vundo-autoloads with-editor-autoloads xclip-autoloads
yasnippet-snippets-autoloads yasnippet-autoloads early-init rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win touch-screen pgtk-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 565759 70059) (symbols 48 23739 21)
 (strings 32 123309 12843) (string-bytes 1 3961754) (vectors 16 67839)
 (vector-slots 8 774089 73975) (floats 8 1463 706)
 (intervals 56 9768 1998) (buffers 992 25))




Acknowledgement sent to Ergus <spacibba@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#72263; 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: Thu, 25 Jul 2024 08:00:02 UTC

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