From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 21 11:16:16 2023 Received: (at submit) by debbugs.gnu.org; 21 Mar 2023 15:16:16 +0000 Received: from localhost ([127.0.0.1]:60220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pedii-0000fG-Cj for submit@debbugs.gnu.org; Tue, 21 Mar 2023 11:16:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:53384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pedif-0000f7-O8 for submit@debbugs.gnu.org; Tue, 21 Mar 2023 11:16:14 -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 ) id 1pedib-0006No-U9 for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 11:16:13 -0400 Received: from dancol.org ([2600:3c01:e000:3d8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pediY-00071r-Vo for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 11:16:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=iaalp3DIkHzg+xgu0Tu3D/I6M54FUmVx0kn72GScvpQ=; b=VQkEU79upJhPDbfpgV0EsJCu4n Y9j5pa7mFhPiQdosyCHF/7Peyp+5WVR1dzfLfJFXuWBDW8Vh90b6g3kyBMvcGPbYrMFMKzH4A6hxe DV6S58VY6cfqjziIgniBYyufK0qY2swE+wE63QqdDCMqSvPhhCrZlFkRpVlJaey7Cl108hKMMOcB3 oaLJlVu2LH+L7NsqhSp5w6O5cAMypvrlTdtOiYgaNmeCwvx2U4jwOx3BLD1NyiHLAMW7LkDBhG3ir gc6eSRfmxTfnAQVPq75ku+QFjOsg/XzTu7ox/wE9Hd47+tLJzedZ6nYfRZVBcDdOT8GNnKB3JL9bq QJ/Kbwig==; Received: from 2603-9001-4203-1ab2-4cd2-c35b-3ff7-136c.inf6.spectrum.com ([2603:9001:4203:1ab2:4cd2:c35b:3ff7:136c]:39880 helo=localhost) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pediS-0003N8-Vf for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 08:16:02 -0700 User-agent: mu4e 1.9.21; emacs 30.0.50 From: Daniel Colascione To: bug-gnu-emacs@gnu.org Subject: cc-mode fontifies variables incorrectly when const follows type Date: Tue, 21 Mar 2023 11:14:13 -0400 Message-ID: <878rfqcez5.fsf@dancol.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.org 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit 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: -2.4 (--) cc-mode incorrectly fontifies my_variable as a type in "MyType const my_variable" From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 21 13:39:56 2023 Received: (at 62339) by debbugs.gnu.org; 21 Mar 2023 17:39:56 +0000 Received: from localhost ([127.0.0.1]:60468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pefxj-0000uX-SD for submit@debbugs.gnu.org; Tue, 21 Mar 2023 13:39:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pefxh-0000uC-UW for 62339@debbugs.gnu.org; Tue, 21 Mar 2023 13:39:54 -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 ) id 1pefxc-0006sq-20; Tue, 21 Mar 2023 13:39:48 -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=NrDPkI6is4IGkwDVOxYtDu0XHOO1AxjmU973nVCADe0=; b=UQAASEOyP+KT sqi2CJ+b3RuNos9pGVmc8xw60nZ6IxT2P/1Vflz7UIr38Qs3p4fMriaB9RVTiacRj5lLrAIwYywmD hf9KAHtJjeNxTK8pBIBgGXAzKh8zVt2LmYHeyvSrYZYiPkSKXiveS0Zb4ZuG/OBlTnS2bQYhrh5cp UWIt6Y0AIhzZu5vaH4fUY32PiMU3+/ivN20GwQ1JNfklmk/p9m90y5nXiPklekhvMCwdwGSwDivvj 7MR4YILppFHiiNnFk16ZLpswelh4sB7neud4lYjwT7M8bCC7dqgd2TEZZut2Zvw/zM+orUAgaj2qY gf+bGAG3uQO1ptvLSkXqQg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pefxZ-0005Y7-UQ; Tue, 21 Mar 2023 13:39:47 -0400 Date: Tue, 21 Mar 2023 19:39:57 +0200 Message-Id: <837cva6m1e.fsf@gnu.org> From: Eli Zaretskii To: Daniel Colascione In-Reply-To: <878rfqcez5.fsf@dancol.org> (message from Daniel Colascione on Tue, 21 Mar 2023 11:14:13 -0400) Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type References: <878rfqcez5.fsf@dancol.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62339 Cc: 62339@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: -3.3 (---) > From: Daniel Colascione > Date: Tue, 21 Mar 2023 11:14:13 -0400 > > > cc-mode incorrectly fontifies my_variable as a type in "MyType const > my_variable" I cannot reproduce this, at least not in Emacs 29 and 30. In which version of Emacs do you see this? If Emacs 29 or later, can you show a minimal example source file where it happens? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 22 10:20:34 2023 Received: (at 62339) by debbugs.gnu.org; 22 Mar 2023 14:20:34 +0000 Received: from localhost ([127.0.0.1]:36290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pezKM-0002JU-3z for submit@debbugs.gnu.org; Wed, 22 Mar 2023 10:20:34 -0400 Received: from dancol.org ([96.126.100.184]:43586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pezKI-0002JI-KC for 62339@debbugs.gnu.org; Wed, 22 Mar 2023 10:20:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:In-reply-to:Date:Subject:Cc:To: From:References: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=HaW6g+DWiTT7U8TzYS13Cd9DaElTJv70xQCi9J/9MKI=; b=d9Aofzkd8Xo5qClS39xr1/UEzC yqM7S0f+aSSLnkYYpv3h35S8TG7c3zOeWz/xBDcWYWHQHV/P1EO2J6TQGt5rm3Ly0OAaQxACkqK+S hgP82oxu4jtOSoE6e7W3L3mjRxQBvrQmERer4C7eFNjviYdh7YHkwtIuqR55PmQxlnuNdf5j/Gg4G ZxHWEYdNwvw+qYgMsJ5WNRs5mqsqi3PchaVIrtdBEIIDXuWv/cBuaxTeugkuvMgdGkyLNI7v7T3Ws ZXdWedzjqvrbZ5ygpMjb0iKMi04fCoA0+L5UmSnhRzGARp1okYY/p5GETR4l4/8G4AkjSdyyNDNd/ bShP7Ulg==; Received: from 2603-9001-4203-1ab2-7c3f-29cd-ef5a-f3a8.inf6.spectrum.com ([2603:9001:4203:1ab2:7c3f:29cd:ef5a:f3a8]:39124 helo=localhost) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pezKF-0007JO-3y; Wed, 22 Mar 2023 07:20:28 -0700 References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> User-agent: mu4e 1.9.21; emacs 30.0.50 From: Daniel Colascione To: Eli Zaretskii Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type Date: Wed, 22 Mar 2023 10:19:55 -0400 In-reply-to: <837cva6m1e.fsf@gnu.org> Message-ID: <87y1no6f6d.fsf@dancol.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@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: -1.0 (-) Eli Zaretskii writes: >> From: Daniel Colascione >> Date: Tue, 21 Mar 2023 11:14:13 -0400 >> >> >> cc-mode incorrectly fontifies my_variable as a type in "MyType const >> my_variable" > > I cannot reproduce this, at least not in Emacs 29 and 30. In which > version of Emacs do you see this? If Emacs 29 or later, can you show > a minimal example source file where it happens? > > Thanks. This problem reproduces for me on latest master with emacs -Q: ``` TEST(Foo, Bar) { NamedTemporaryDirectory const test_directory; } ``` From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 22 11:12:48 2023 Received: (at 62339) by debbugs.gnu.org; 22 Mar 2023 15:12:48 +0000 Received: from localhost ([127.0.0.1]:36364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf08u-0006BB-Hg for submit@debbugs.gnu.org; Wed, 22 Mar 2023 11:12:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf08s-0006Ax-DZ for 62339@debbugs.gnu.org; Wed, 22 Mar 2023 11:12:47 -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 ) id 1pf08l-0004G9-HT; Wed, 22 Mar 2023 11:12:40 -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=7L3QV9z3Eood3YlV4cz4atZ278Y8JvMibC8HtTuRXXg=; b=qjQdvvzw827L QltptNvjuhulKHl35yu5NGLAwZXFP3Gg2bsWXxJpH0AvDuXP2BVbW1Ei5BP13p6R0zSoVjDlWab5A 8yWgjrztN4RQTFQDQOb3nSRUeU47JxejLrH98jrQu7jwk2LZP+11A+EhWiPUHr809ArDUqNe4XcSG FIkpOAUW1Ldlw5ng4/Fw6LRxRLyowBoF9rQOtEG+pBxrPix0zgy4MtmS8KDqrBmqMZ8fb5EzWS28S MBQBV/9UAE8vfuFvHQCs260qs1uMmlZyfgY3eSMIDeAGVsnSY6FoRsmDm3wpPmFfvunpknprN5IxO JeY+FI4DJp6nEBfzB0v1+Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf08k-0008TF-Dn; Wed, 22 Mar 2023 11:12:39 -0400 Date: Wed, 22 Mar 2023 17:12:52 +0200 Message-Id: <83ttyc6cqz.fsf@gnu.org> From: Eli Zaretskii To: Daniel Colascione , Alan Mackenzie In-Reply-To: <87y1no6f6d.fsf@dancol.org> (message from Daniel Colascione on Wed, 22 Mar 2023 10:19:55 -0400) Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62339 Cc: 62339@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: -3.3 (---) > From: Daniel Colascione > Cc: 62339@debbugs.gnu.org > Date: Wed, 22 Mar 2023 10:19:55 -0400 > > This problem reproduces for me on latest master with emacs -Q: > > ``` > TEST(Foo, Bar) { > NamedTemporaryDirectory const test_directory; > } > ``` Thanks. What I see with Emacs built from master is that test_directory in the above example gets font-lock-type-face in c++-mode (but not in c-mode). With Emacs built from emacs-29, both modes produce correct fontification. Alan, can you please look into this? From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 22 18:15:40 2023 Received: (at 62339) by debbugs.gnu.org; 22 Mar 2023 22:15:40 +0000 Received: from localhost ([127.0.0.1]:36826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf6k6-0005bl-D6 for submit@debbugs.gnu.org; Wed, 22 Mar 2023 18:15:40 -0400 Received: from [193.149.48.5] (port=12877 helo=mx3.muc.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf6jC-0005Zq-AB for 62339@debbugs.gnu.org; Wed, 22 Mar 2023 18:15:37 -0400 Received: (qmail 1674 invoked by uid 3782); 22 Mar 2023 23:14:14 +0100 Received: from acm.muc.de (pd953a9c8.dip0.t-ipconnect.de [217.83.169.200]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 22 Mar 2023 23:14:13 +0100 Received: (qmail 20913 invoked by uid 1000); 22 Mar 2023 22:14:12 -0000 Date: Wed, 22 Mar 2023 22:14:12 +0000 To: Eli Zaretskii Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type Message-ID: References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83ttyc6cqz.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Hello, Eli and Daniel. Thanks for the bug report! On Wed, Mar 22, 2023 at 17:12:52 +0200, Eli Zaretskii wrote: > > From: Daniel Colascione > > Cc: 62339@debbugs.gnu.org > > Date: Wed, 22 Mar 2023 10:19:55 -0400 Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) -0.0 SPF_PASS SPF: sender matches SPF record 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, acm@muc.de, Daniel Colascione 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.3 (/) Hello, Eli and Daniel. Thanks for the bug report! On Wed, Mar 22, 2023 at 17:12:52 +0200, Eli Zaretskii wrote: > > From: Daniel Colascione > > Cc: 62339@debbugs.gnu.org > > Date: Wed, 22 Mar 2023 10:19:55 -0400 > > This problem reproduces for me on latest master with emacs -Q: > > ``` > > TEST(Foo, Bar) { > > NamedTemporaryDirectory const test_directory; > > } > > ``` > Thanks. What I see with Emacs built from master is that > test_directory in the above example gets font-lock-type-face in > c++-mode (but not in c-mode). With Emacs built from emacs-29, both > modes produce correct fontification. > Alan, can you please look into this? I think this is caused by a faulty fix of bug #59267, where "typeless" C declarations like const foo; , which are implicit int, were not being recognised. In the current test case, in C Mode, NamedTemporaryDirectory ought to be getting fontified as a type, but isn't. In C++ Mode, test_directory gets spuriously fontified as a type, as already noted. Seeing as how the current bug affects only the master branch, not the emacs-29 branch, I think I'm going to take a bit of time to fix this bug in the hope of fixing it properly this time. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 22 18:38:54 2023 Received: (at 62339) by debbugs.gnu.org; 22 Mar 2023 22:38:55 +0000 Received: from localhost ([127.0.0.1]:36831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf76c-00068w-J7 for submit@debbugs.gnu.org; Wed, 22 Mar 2023 18:38:54 -0400 Received: from dancol.org ([96.126.100.184]:36746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf76a-00068n-47 for 62339@debbugs.gnu.org; Wed, 22 Mar 2023 18:38:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:In-reply-to:Date:Subject:Cc:To: From:References: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=9fK1X64cGx7fj0mcuL5m8WiTWYLUIYSnWA2qQj8ni/w=; b=OBt1iecJ9rTI1s/wJcEFjow/jX w5aND8sTt3KlfLQtADdZ5KWnJIzGRAKRV8jBo7fUKM+e6tgabUt/CNpxx+zHjEQlXCJgr83lkGu9N 7ULTCv3tXj30ucbSZto9Z23yfRd8s9y4aVxLM7kHbJrdRrF0sxXqazSxsIQZjQl60+wZP/5rtr2im upaSysiYa+cZGoh+3XcbskNotxRdgYLm5cC8lojMgOsnSwBycRSxmhvtdWlnj9g0z9DQNO8RjVZLX 3EBOy6abwLhNBBqZRSwVf4iCaWOPZnCX/Hkij/WVageki01Pr0+7lG3uvK5zaRQIeAbpghqyAprw6 9wn3xhpg==; Received: from [2600:1006:b165:93e0:b18d:e465:b583:372a] (port=46346 helo=localhost) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pf6lt-0000Rs-FS; Wed, 22 Mar 2023 15:17:30 -0700 References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> User-agent: mu4e 1.9.21; emacs 30.0.50 From: Daniel Colascione To: Alan Mackenzie Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type Date: Wed, 22 Mar 2023 18:17:05 -0400 In-reply-to: Message-ID: <87lejo1ldz.fsf@dancol.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, Eli Zaretskii 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: -1.0 (-) Alan Mackenzie writes: > Hello, Eli and Daniel. > > Thanks for the bug report! > > On Wed, Mar 22, 2023 at 17:12:52 +0200, Eli Zaretskii wrote: >> > From: Daniel Colascione >> > Cc: 62339@debbugs.gnu.org >> > Date: Wed, 22 Mar 2023 10:19:55 -0400 > >> > This problem reproduces for me on latest master with emacs -Q: > >> > ``` >> > TEST(Foo, Bar) { >> > NamedTemporaryDirectory const test_directory; >> > } >> > ``` > >> Thanks. What I see with Emacs built from master is that >> test_directory in the above example gets font-lock-type-face in >> c++-mode (but not in c-mode). With Emacs built from emacs-29, both >> modes produce correct fontification. > >> Alan, can you please look into this? > > I think this is caused by a faulty fix of bug #59267, where "typeless" C > declarations like > > const foo; > > , which are implicit int, were not being recognised. Can we back out this fix in the meantime? These "typeless" declarations can't be all that common. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 22 20:43:08 2023 Received: (at 62339) by debbugs.gnu.org; 23 Mar 2023 00:43:08 +0000 Received: from localhost ([127.0.0.1]:36914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf92p-0001lr-PJ for submit@debbugs.gnu.org; Wed, 22 Mar 2023 20:43:07 -0400 Received: from sonic305-22.consmr.mail.ne1.yahoo.com ([66.163.185.148]:43762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf92n-0001lE-3N for 62339@debbugs.gnu.org; Wed, 22 Mar 2023 20:43:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1679532179; bh=Ztr+1+ntuviTdi8DGTJl5h0FtJ6rb4mGQcZC1AFYruU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=hkJB9RXqu110S02z+gSOzgnbjMAUIxOvyC9yShu4k0bTvyFKcw6gB9+HC5h8Uf2R8yR9FjYl34/nQKBTbO59dVqXCpNEqNjG9XiwdUFKzGXonUH6DhM6vKoQ+cJn5gQn9aD5VvZkwtQoFUab/sv7etHkCA51xccbFZlwSni2vgQca5aEBx6zEj87nVDSnstvehyJLfEcxv5YiKAs8hvMxnOjryfH7yQjGKwUFKrnKgizBILXz0vEjJJFX2taEJW+mC2K1zY0FFzcbV8FTx9Uaqu8gBzyBYtWJSsaBaVTaV0sqR12s8AugqA7QOI/nFJv4316hWyYxlEL0zpC1lk7CA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1679532179; bh=ZcQ40xqzayGLjd7d7CNxzEV/KwaBT3hskxHiVIJppe2=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=enLCCu/2ITlMlzC4WYW+J6JkK2mhYdDVEOc6vyVYbGN8r8bxmSnvrsfxGaEUJv46oykGed33/3/5xJMTXVxMG+9SK3cPXejXCcUQYcs95t3Pl+B751Bm6kFlVn4ae9+B1Q/SuSRRkkotsD9jsnOlNJupAmEMx8MBVajx0IWj98ctEoTLV+Uxo2WFU6RHl0o2/VngFgRQOmTwgkNHzbKacn/Lf2L+9kpHOlyZUBF6pzvSIkwtbvFdQSLbnZltPp5V7I/zkN6PdWaFyY6knExTeECJ9hOLsTHkWQiBdfewiZnmAn6CVNwoNqFo4s2AZCBcW3kh91XCEsxEQDGjbih/Sg== X-YMail-OSG: fkrG0GoVM1lcvv8jqf8wxCnGyEK5MupaDKdo.FuGrLb2pugcoaMcQ3FirLx0wFw DjT3ANmmALmBZHI9aYAEWqkvCU_WQZzWlQ4_CgL3Ud73QjdrFMALFgLM77Jdl6YIme3s4J12kn_1 Pnb69HbBxo_2X6tkfbdtfvwxJKwsxvmezhymzLOO24gt_wv5CkyLH6GwWzZerDK4C92KGuPpImWH bx.rc8btYUeAHIW_8yNVR3ZWBSLV0uLIy3B6w6_Oawq9us4ZNsiURE8NJoci8XEG7nZ9Ls4dRO8i KJX8U3oEbLWjocn4qSQ7lrzcKqgS5B5JO7j05rqwZk_so14cDhdXzKn5lHXIUOQt0UiIUk4.NSPw ZKepp561wbcJZBjcI_eCGmL_ZANLHjV2CIXPG.DEe_kzuUjDjNllgkefRnZyeAwA6QzN7P4R3OSN ybbDev64ncag.JovsUtlGvOAMBc1mi9qQjsrA8RGFCK8hY9b8m8G_pw0asyr_8OA9MPRWTKJ71PC 7LQ7MYAp3a31Vl6B8ccYow9Wcz06vZrSwm7hMjq2zveFpZZPRmXObCEL7tcBb5HaC.JH3XZoS_Wc KmkeugTP1K8oevN7ebbCTo5lUUo020LRP4JeFGYTctfGzn_FJaGkJKSYWSAELT0U0Em7YPvctK8d j8CBFsRok1d94BD1h0Pbd8EWv2n.rb_KxambgpeYL_c4YWEW9epb1_u86Gm4MQktIF7Yy8xj0OiD y5m6eBQN_k_CclFwFcdH8nqcyd3dAYzsI.Hrk8E_fst3ZqsAALhzMa_7NZT3GfE4RUtHreowu7qF rByLSwkXnoJV2MWYM4vyQgwo1QS2yhLjujZA6PhQ3DWny39C6CXjlUxWV0SFXMKQvcwfxlIHQyUf Tf.TShbjBtQyllYi7kDq7H2enpqyWojVuI5sTd23TWHUR9L3Og_GTlkkmxa4oPKdrfhJ99zpHxlS BjQ23pFYv21WW3pQLEX3q9zJgwOQZKgRjc.Qc46ChcWN0ZxDy3s1Su_23yAmHBwnzRpF.hAZqowP Mf02gVGNM1U8ZOygREn4ihQuTif6Ka4X_NV4Gv8iOLstiP0sWhRCQ7F.WsgwD2KnetODzqY8Q9h6 j8vp8qc.I4PWrmetQripPBlH4o4ZERpzROTUwD2qED_noeDOG5cGrFN95AWS.dzwYOOcPE6YShsA b2grZyYE6MAXGU4d_r4XZfFW02K.PB1VW1peEnact8KOaMJFJx4iT0tUwS9h4VqvNbyWz92_009J vfnRa_NU1N5m2FeQY6q6DBMlN0wzT0I0cbOUeikoE6wcuibEQKWsHjGX1JuwQHeGsqLwq0u_a4_q SQgb9y_7xGpw3gwOAhG17XyNm6YBgWQjJBvzcoJdA7UBpkBa1hazPL8omxCpi1YyluOO1jIiwLiR CymrAxbVW96F7mtm4iL8ztZWfEpS6HnVVhoVu0Cy0ncRaklETd6KpZRmjJVlmWlBFXw3FZDmUrL4 zsGSzwpdeMZr0cUGHeaylPclH4Yy4rJxhNT_KRGJeYfOYGb4BJBm22cWcx8WGymYMp2OqZFeojQe UOQBRsiIsv__Q_r5OZzLIsxHJy5SpKfLtlmTmFJhOQahNyUxESa7RnjuCmU4MAJT27yCc.VkVj97 D..copevjkZZHfMqp09M0TYiCpt0XNE53XLhHtidSz5knqt22CMjXN_ECG6_RlO.NckUYa.qQVE1 PYTSbmK0Z7cd.17wszjpQC57XrABx87Lq5I97DZ3oBXYmWZSnX.DiC5r1F0Ck6IaW7K44wW_HlC6 CrYzYPi7urdQsEZ9dQw.dVckRUkmoa9HMmHyEEwjBtt8y.PigC.JQqoRjHEC0e.1KyS2pSG.WQMn wu2a1ajbBl5psPUrPm83ZfTHu16ktpgZ4fZCZgu2yc6FtG12vloFrMMnxbo8RJ6AOwt.R7QHhO69 XeuwEFMrupAIQlQeoI01ZDko_unhnPZfLus42fEiH1x75mO_3jFUAIroP8LzQSHffsM4sO4qt8jE rt08iWfVQh0qPAGIkQWEb1_S.Von1oHiYpoiQoC6eaS0_zDTrborZzL.ORdkmqIct5FqK8wyKAFm xGV4Hxdqc_z8Iv1JO6.g2_QhLm_XQZ4gzonukJRbL6QCi9THfWrhmKIa_gNHsGeaNu0zX1Tw0Z38 96yN0GZdZqrqW9YT54gRFod4rfKHSxKUrOc_tVC8wRHJMSeOFHjSfpgNCkgsUymXCd6L.5xeC5rB blw7FBK4bFIgH3HkTx.ax0l6t3_w4CFQU6Ir3oPKX05LD7eNals1w48aoWqWI4Q-- X-Sonic-MF: X-Sonic-ID: a5bb66b8-06e6-412d-93c2-4da17ed02905 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Thu, 23 Mar 2023 00:42:59 +0000 Received: by hermes--production-sg3-67c57bccff-wt27l (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID cc36faa933f15a18796c72c1ae3aebad; Thu, 23 Mar 2023 00:42:54 +0000 (UTC) From: Po Lu To: Daniel Colascione Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type In-Reply-To: <87lejo1ldz.fsf@dancol.org> (Daniel Colascione's message of "Wed, 22 Mar 2023 18:17:05 -0400") References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> Date: Thu, 23 Mar 2023 08:42:48 +0800 Message-ID: <874jqcz4af.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21311 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 191 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii 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: -1.0 (-) Daniel Colascione writes: > Can we back out this fix in the meantime? No. > These "typeless" declarations can't be all that common. I see them more or less every day. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 22 22:02:31 2023 Received: (at 62339) by debbugs.gnu.org; 23 Mar 2023 02:02:32 +0000 Received: from localhost ([127.0.0.1]:36964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfAHf-0003x1-I9 for submit@debbugs.gnu.org; Wed, 22 Mar 2023 22:02:31 -0400 Received: from dancol.org ([96.126.100.184]:41414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfAHd-0003wr-Jj for 62339@debbugs.gnu.org; Wed, 22 Mar 2023 22:02:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID: Date: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=0mf5xW32K0Cha6T2dEAVMy2BphblxxbpB2Ws0rgTaGo=; b=FOD7zDiJvax7wxEcd5wiGsT3wH 2oaiaQAyeI5UFY7cQxTB8od9Hv23lX49KGpHmuoEOQ087FDsOessIainMOAaAEoopI67wn74mtDff zC8JBbFij04gvUinuWw+Orf/iiPObFqKjvH32ePietkDs2/dwL7hEoYv2t3ShiEr5c2Pm5NbnvCGO wKIVPSMDfjKdv0PwH5LdtJ/mVCegJD3sdukRwS22fvweiciffb98MvVcveDnJdhD0vC2BmCWi2h09 oMefngMhM68OCUrJ/eenZb26QRde6oNqhuWA0QncvlAFdhuV+ijF8Hrv7xpbT1IzHDEIqfcuTvxDm C/rr/nnw==; Received: from 097-104-088-154.res.spectrum.com ([97.104.88.154]:48900 helo=[192.168.86.235]) by dancol.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1pfAHX-0000yI-RQ; Wed, 22 Mar 2023 19:02:24 -0700 From: Daniel Colascione To: Po Lu Date: Wed, 22 Mar 2023 22:02:22 -0400 Message-ID: <1870c33ebb0.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> In-Reply-To: <874jqcz4af.fsf@yahoo.com> References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> <874jqcz4af.fsf@yahoo.com> User-Agent: AquaMail/1.43.0 (build: 104300275) Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1870c33eeae11f02829b0260ea" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii 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: -1.0 (-) This is a multi-part message in MIME format. --1870c33eeae11f02829b0260ea Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 8bit On March 22, 2023 20:43:02 Po Lu wrote: > Daniel Colascione writes: > >> Can we back out this fix in the meantime? > > No. Yes, we can We lived with the old behavior for decades. We can live with it a few weeks longer. > > >> These "typeless" declarations can't be all that common. > > I see them more or less every day. Give me a break. No, you don't. Practically nobody uses this obscure and deprecated C feature. If people did, we'd have addressed the problem years ago. --1870c33eeae11f02829b0260ea Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable


On March 22, 2023 20:43:02 Po Lu <luangruo@yahoo.com&g= t; wrote:

Daniel Colascione <dancol@dancol.org> writes:

Can we back out this fix in the meantime?

No.

<= div dir=3D"auto">Yes, we can  We lived with the old behavior for decad= es. We can live with it a few weeks longer.


These "typeless" declarations can't be all that common.

I see them more or less every day.

Give me a break. No, yo= u don't. Practically nobody uses this obscure and deprecated C feature. If = people did, we'd have addressed the problem years ago.
--1870c33eeae11f02829b0260ea-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 23 01:45:43 2023 Received: (at 62339) by debbugs.gnu.org; 23 Mar 2023 05:45:43 +0000 Received: from localhost ([127.0.0.1]:37133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfDle-0004JP-PP for submit@debbugs.gnu.org; Thu, 23 Mar 2023 01:45:43 -0400 Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]:35127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfDlc-0004JB-Ry for 62339@debbugs.gnu.org; Thu, 23 Mar 2023 01:45:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1679550334; bh=El0a3FJPDdKSnWUFktqsVgixCPyt9xo/fZ6tbJFgirE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=PDVyphxOeQ+RJH3j33a+vD2R/ib7vAZfzbwA6ftb0ULMcI+84uwGQp+mk2XhKkdyYffFoMDRCLLIqTUCTKKFWq4m2x6+f4UT2a0GMHqwiWTAs3NzeyKn/I2MmMQd7eN8bUrTfLwFK9LGFrCpbrc4eHACLlEqfXhYMRQfxf/TYLeSxiqjF/g7HLoMZY3/fLYtrri8tl4iHz69aBS8GO289VZI47iXhXw0GzMPoRESCLSsyWzsiGYsy+63YWdgGxjdgAvUDJ3v91Z3e7E37GugKaLcu11D9yAzvM4mA6cvp73K8TXsvKWPxPpJj35C3ouq0+EQS+6/Vm4Tfb2RSHhtOw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1679550334; bh=LxggGwTheylVINGjF0RXrBwQKs/P9ubqUHA2Q+b7MNM=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=t2jmV6FoWzv4oSD2NHaig8vvh4Cb0dIC91XnsPTlGImKdQ04xKeMNvVxwHBOjXyVOrskdAW/m5hzob8x2r2+vPIHYQ7jnRLl8soaZSPIHOYnrwOSnjAN/ytNJfUm18LIUe2qqMzuVosCAJXuQ+wIodSgEfO7GhCASdYME3B+K+siuq+3suR9SiQoFTWHouPApkBZIzrg0cKCMFOuikA0LxlptfmAHAUe3DIlzJrvRXJtuc3DMCFFSaLOh+J50A3RFMr3l8VG8yGXgg55vMHumM8aG3GesUpDWJagGospBg9ldb/HPj5JhrPC3LNlvl8gLO+2VH0F39kFXF6HCzI49w== X-YMail-OSG: __PcgyMVM1l_wAKSNIg3j2d1G8MlzQQkBWpvkpubdIi8G0QvXwbPQGyJFRNziod w8OAFEBdL9ewY3TCdzyQY_D5k4id4XZKoCsRK39K1pqNGqa_4SS5Eij04Ueq_rRWdwj.koEmBKXC TOdevYbhjyhbHn0OZT.SdAMIHFlP7t5mYubKqTZxu89Q5G7ZXWOGThjVLH1b1FCkzvJlDA6g88nb yhNfUGRN.szdgSzj3vmblZSbgxzeH4kcNEdVvOMn1ZmhZD1A77ofqxKgwGTfdLF.ZcmTh5dsAyOp n6FHUibJIZY25ks9QbhD6Nw1sOytZbKGi0fOPxGow965Prftn7XEPriC6w1Xn0nzXLfv5bt6tJtE WW95tEF3FzhaZkyymYmkWXtcsq33UL1.q366.ihZ.B1jaTx.TEBIATB7ep1vE8fordFILNWFg3iu yJMCzl0w.rVTZvimlRkaLJkLlhUYEJ4FzYVBALzi0TutLWXbNsXnBECKbUPqXbiwV0S6Hl2r8s3_ 3Yk_WlYrsYZah.Dar5jDhgShjjdkae2lCXr1.ir8MlBCVSn0YA6t6s0FpXZmVNQaFFxaQ__wALk8 ZZbUU6euKDr0rivnMgfWg1laLafFIPNN6b0g92EXJkfTGpFjMFCU_eY5uVzNsZCwLRiYivR1gu_V UhVh1Ea7hxI4zTzdh7ZDRaBefGiTx5yVveHk1C87ic.XDyurP5tCQ7J5hXLW1CfkrF4zGKhXFysv U.ZyZKmu8sEP4mbVMBMjHSh3fWVgjWFAi2YzvnvgebJGQ_dML30WdL0UCwP6tl6jzuwA2b0y9ey8 pgJsOnMxIX_YSauoxtyMTSnn4pZVjPs2r2w_ETcQvYSf6TuSaGtPaYsBX9yMa2W1CUQ5DIIohTJ4 aGTzepeZowutWDufTHL9D9Gamgol.dXZ3Wm.LD7BjZBZlkCFoyM5vIXHzplM7hQ8NbdN3rPTiCks rH5a7x0xAiva6RajV2QUJPrq4pSksf3heGSkvRig6e1vE_buwCuLaRk5u18sCqyl8HKkn06pLj27 EsDO7MPBZitJde1FsYGjR21R3NDZNxVnawO6h1yv4WPnzUqrwQ2ARnkyhevQJgLfZGvvRqnD.TRl TkqK1n0V_7YnhbO0mQ11nbjZiBc8ROBu2IZFGCd24f6x4I1Iba0tWwYfzYYFVUzlfSfyIJRFQyIt _T1NTOprw3k.eh29jNwU8lCnGoxwarWYZBjgEx8Gh0qwgmcQCh7hnRyj_Nkf_ugqSw2PSCPcVcOD hch8GnYscynB93YXSxLaxqIl23OgLQm91HxNN2XYWp2J8enxxknB2j5zfeoaqIuPLkf._iCeN8wI RIPdgVE4M965ZEYT1.zM2ypLA1nrTLgMQOSZRim2pjMAXy4S.rGotnyzlcAFkTH4y19xyhXPdfqL 9DUIBM9EfUvlPU_uAuCC_.fDbsX5wVLi8KgghAV2279WWvG_4N0DRO58e_84YmFZ2Xv.BX0GZVU_ PdG6q3HGEaUxa1YKccpt5fDuO3MJ791qA3G8XB4DtApMapShjfZAuiKOnNOFFb2TJw8wqsvLmuvX mymr6712BNpDjXvAKcAh2X.yIheQI.p0Wr7vNzsWuVj.qeuB14z61.hk1jZKCGYRAhwZowJVBERP OjrICl05eG.WV6NEbaBqTA2hRGU39qYatw5h3gb4WSQT14pFC_CT2b4dj82Fue2_qikYVtg1HdV. ysJMcFZRBk9hRcwFn3o_ftDYc5SwjxV7fTk_8IFkd8orYSePjX0JUGnhx9UL6Yg_vCA8Qxstug7n tfFEnJ.yMKRbXN3P67duSUESx3kIdPnqxKuiJWDRuE6OhSM5QwMiRr0sGXEVA.KCuboS.xKj9VT9 R9wgsUhhoDeXPxe1ZyfMTmTeVEYgDYsfbkEc949.XzeYtamNcIqUKB8CtlB.mEWBSBnZucw.jGhx 3DDbj9Tv4oa5SZ1C5xVI_RKUXLjNT1iEK8ERdmA1LuWWuVGWp9xpka.8dSoscIPgzKNl4_9NNRm5 rkLUrZDFi2F4wbEGLK5Xj7ND5qDhMFF6wAf3hAfhaws5QLZ13N7Y61cOEls4_7qMv8T3_ICceMY5 8ZENo4e9RJ5opD1Ve1vPDebVUpcsnPlMio.5y_isHCbbKuzlEXJG8EQ6EF93NXMOskms9LXoqD1b TroMf0i.qQKnLYvX77HKK5tFZmfZYuK0pMUF3RB7laXx3Fx.g65WZUHMvWnGEnxTujGblURUdOdG ROsNWHKpCtQK_U216iRGMK.mHvBeJYZeDOIrmpQbaGdE01RO.lY5vTE3cijEttYuVeqc- X-Sonic-MF: X-Sonic-ID: f0fd4f77-7382-4e57-a06e-b2aa0dfac7bc Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Thu, 23 Mar 2023 05:45:34 +0000 Received: by hermes--production-sg3-67c57bccff-5hdhr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID cd741c7c7af083b8b19d8a30f7f99507; Thu, 23 Mar 2023 05:45:28 +0000 (UTC) From: Po Lu To: Daniel Colascione Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type In-Reply-To: <1870c33ebb0.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> (Daniel Colascione's message of "Wed, 22 Mar 2023 22:02:22 -0400") References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> <874jqcz4af.fsf@yahoo.com> <1870c33ebb0.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> Date: Thu, 23 Mar 2023 13:45:21 +0800 Message-ID: <87r0tgxbpq.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21311 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 740 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii 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: -1.0 (-) Daniel Colascione writes: > Yes, we can We lived with the old behavior for decades. We can live with it a few weeks longer. I reported this bug because I saw such code in use. > Give me a break. No, you don't. I do. I *see* code making use of implicit int every day. > Practically nobody uses this obscure and deprecated C feature. If > people did, we'd have addressed the problem years ago. Who does ``we'' refer to? Put bluntly, you have no right to decide what C code I see or write, or what C code Alan wants to support. Declarations consisting of only a storage class specifier are part of the 1989 C Standard. This bug is no more important than bug#59267, and both will have to be fixed and stay fixed. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 23 03:22:07 2023 Received: (at 62339) by debbugs.gnu.org; 23 Mar 2023 07:22:07 +0000 Received: from localhost ([127.0.0.1]:37196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfFGx-0003N6-5r for submit@debbugs.gnu.org; Thu, 23 Mar 2023 03:22:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfFGw-0003Ma-1G for 62339@debbugs.gnu.org; Thu, 23 Mar 2023 03:22:06 -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 ) id 1pfFGp-00028Y-LA; Thu, 23 Mar 2023 03:21:59 -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=YVN9J4QiSH5oeFoyI+aQAqynZL04Ks1i3ldks5TDX6c=; b=JUkEuvM+YEv6 QZE+b3nTwHmfghnYnTJ9hpNV8DJLXGZ32Zcn0LDV0DBoTDh2aJ9BtyOkRRhEFIK87aWHbbzVsUIJw ayt9mLD0LOk9yktxTN75QuJtZT3RsMf36Ajt3aU3lBleVXjtbKAs0/KuKc1bm2/0iXW4VNAPXMndk MrppP1gPUx9a5cGe5YUoyjGX3i9FBUxnbNZSAxTV5EHT15bKAJhq3elIUJUeks7W5KYmJKRFTbh1t dkhh46Fkfbz4P4GYJT2H7D87KOTwAXmp8DWTajcIcnwfX93O16duEr11Bz6UlT3cxV7AKTm/dOwR6 nK8/GCTRw+YJ5b37uQxcBQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfFGp-0003sI-2l; Thu, 23 Mar 2023 03:21:59 -0400 Date: Thu, 23 Mar 2023 09:22:15 +0200 Message-Id: <83edpg53vc.fsf@gnu.org> From: Eli Zaretskii To: Po Lu In-Reply-To: <87r0tgxbpq.fsf@yahoo.com> (message from Po Lu on Thu, 23 Mar 2023 13:45:21 +0800) Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> <874jqcz4af.fsf@yahoo.com> <1870c33ebb0.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <87r0tgxbpq.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, acm@muc.de, dancol@dancol.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: -3.3 (---) > From: Po Lu > Cc: Alan Mackenzie , <62339@debbugs.gnu.org>, Eli Zaretskii > > Date: Thu, 23 Mar 2023 13:45:21 +0800 > > Daniel Colascione writes: > > > Yes, we can We lived with the old behavior for decades. We can live with it a few weeks longer. > > I reported this bug because I saw such code in use. > > > Give me a break. No, you don't. > > I do. I *see* code making use of implicit int every day. > > > Practically nobody uses this obscure and deprecated C feature. If > > people did, we'd have addressed the problem years ago. > > Who does ``we'' refer to? > > Put bluntly, you have no right to decide what C code I see or write, or > what C code Alan wants to support. Declarations consisting of only a > storage class specifier are part of the 1989 C Standard. > > This bug is no more important than bug#59267, and both will have to be > fixed and stay fixed. This argument is pointless. Getting "blunt" (a.k.a. "rude") over that is certainly uncalled for. Anyone can make a local change in the relevant Lisp code if what happens in the repository doesn't suit him/her. Making a local copy of whatever cc-*.el file which causes this is very easy, and won't even cause any merge conflicts in the future, if you want to avoid it. Or make a local branch with that change and periodically merge from master. Or any other of the possible solutions. So please don't continue arguing whose use case is more important. Alan will decide whether backing out the offending "fix" is reasonable, and people who track the master branch should live with that until a better solution is found. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 23 10:40:33 2023 Received: (at 62339) by debbugs.gnu.org; 23 Mar 2023 14:40:33 +0000 Received: from localhost ([127.0.0.1]:39080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfM7E-00011e-Jw for submit@debbugs.gnu.org; Thu, 23 Mar 2023 10:40:32 -0400 Received: from mx3.muc.de ([193.149.48.5]:43384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfM7C-00011S-Ql for 62339@debbugs.gnu.org; Thu, 23 Mar 2023 10:40:31 -0400 Received: (qmail 43620 invoked by uid 3782); 23 Mar 2023 15:40:24 +0100 Received: from acm.muc.de (pd953a85e.dip0.t-ipconnect.de [217.83.168.94]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 23 Mar 2023 15:40:24 +0100 Received: (qmail 8664 invoked by uid 1000); 23 Mar 2023 14:40:23 -0000 Date: Thu, 23 Mar 2023 14:40:23 +0000 To: Daniel Colascione Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type Message-ID: References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lejo1ldz.fsf@dancol.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, Eli Zaretskii 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: -1.0 (-) Hello, Daniel. On Wed, Mar 22, 2023 at 18:17:05 -0400, Daniel Colascione wrote: > Alan Mackenzie writes: > > Hello, Eli and Daniel. > > Thanks for the bug report! > > On Wed, Mar 22, 2023 at 17:12:52 +0200, Eli Zaretskii wrote: > >> > From: Daniel Colascione > >> > Cc: 62339@debbugs.gnu.org > >> > Date: Wed, 22 Mar 2023 10:19:55 -0400 > >> > This problem reproduces for me on latest master with emacs -Q: > >> > ``` > >> > TEST(Foo, Bar) { > >> > NamedTemporaryDirectory const test_directory; > >> > } > >> > ``` > >> Thanks. What I see with Emacs built from master is that > >> test_directory in the above example gets font-lock-type-face in > >> c++-mode (but not in c-mode). With Emacs built from emacs-29, both > >> modes produce correct fontification. > >> Alan, can you please look into this? > > I think this is caused by a faulty fix of bug #59267, where "typeless" C > > declarations like > > const foo; > > , which are implicit int, were not being recognised. > Can we back out this fix in the meantime? These "typeless" declarations > can't be all that common. It turned out that the bug was caused by a single missing line of code, a (c-forward-syntactic-ws) in c-forward-type, so the fix wasn't too difficult. I've taken the opportunity also to fix some minor other innaccuracies in c-forward-type. Please try the following patch, and either confirm to me that it appears to fix the bug, or say what's still wrong. Thanks! diff -r 300ebf19cd62 cc-engine.el --- a/cc-engine.el Fri Feb 17 08:58:11 2023 +0000 +++ b/cc-engine.el Thu Mar 23 14:34:08 2023 +0000 @@ -9143,7 +9143,7 @@ (c-forward-syntactic-ws)) (let ((start (point)) pos res name-res id-start id-end id-range - post-prefix-pos) + post-prefix-pos prefix-end-pos) ;; Skip leading type modifiers. If any are found we know it's a ;; prefix of a type. @@ -9153,6 +9153,7 @@ (when (looking-at c-no-type-key) (setq res 'no-id))) (goto-char (match-end 1)) + (setq prefix-end-pos (point)) (setq pos (point)) (c-forward-syntactic-ws) (or (eq res 'no-id) @@ -9304,7 +9305,10 @@ (not (looking-at c-type-decl-prefix-key))))) ;; A C specifier followed by an implicit int, e.g. ;; "register count;" - (goto-char id-start) + (goto-char prefix-end-pos) + (setq pos (point)) + (unless stop-at-end + (c-forward-syntactic-ws)) (setq res 'no-id)) (name-res @@ -9312,6 +9316,7 @@ ;; A normal identifier. (goto-char id-end) (setq pos (point)) + (c-forward-syntactic-ws) (if (or res c-promote-possible-types) (progn (when (not (eq c-promote-possible-types 'just-one)) @@ -9319,7 +9324,9 @@ (when (and c-record-type-identifiers id-range) (c-record-type-id id-range)) (unless res - (setq res 'found))) + (setq res 'found)) + (when (eq res 'prefix) + (setq res t))) (setq res (if (c-check-qualified-type id-start) ;; It's an identifier that has been used as ;; a type somewhere else. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 05 11:53:55 2023 Received: (at 62339) by debbugs.gnu.org; 5 Apr 2023 15:53:55 +0000 Received: from localhost ([127.0.0.1]:52481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk5SN-0007yA-GU for submit@debbugs.gnu.org; Wed, 05 Apr 2023 11:53:55 -0400 Received: from mx3.muc.de ([193.149.48.5]:31856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk5SM-0007xz-G9 for 62339@debbugs.gnu.org; Wed, 05 Apr 2023 11:53:55 -0400 Received: (qmail 61716 invoked by uid 3782); 5 Apr 2023 17:53:48 +0200 Received: from acm.muc.de (pd953aa63.dip0.t-ipconnect.de [217.83.170.99]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 05 Apr 2023 17:53:48 +0200 Received: (qmail 32460 invoked by uid 1000); 5 Apr 2023 15:53:47 -0000 Date: Wed, 5 Apr 2023 15:53:47 +0000 To: Daniel Colascione Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type Message-ID: References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, Eli Zaretskii 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: -1.0 (-) Hello, Daniel. On Thu, Mar 23, 2023 at 14:40:23 +0000, Alan Mackenzie wrote: > On Wed, Mar 22, 2023 at 18:17:05 -0400, Daniel Colascione wrote: > > >> > This problem reproduces for me on latest master with emacs -Q: > > >> > ``` > > >> > TEST(Foo, Bar) { > > >> > NamedTemporaryDirectory const test_directory; > > >> > } > > >> > ``` > > >> Thanks. What I see with Emacs built from master is that > > >> test_directory in the above example gets font-lock-type-face in > > >> c++-mode (but not in c-mode). With Emacs built from emacs-29, both > > >> modes produce correct fontification. > > >> Alan, can you please look into this? [ .... ] > It turned out that the bug was caused by a single missing line of code, a > (c-forward-syntactic-ws) in c-forward-type, so the fix wasn't too > difficult. I've taken the opportunity also to fix some minor other > innaccuracies in c-forward-type. > Please try the following patch, and either confirm to me that it appears > to fix the bug, or say what's still wrong. Thanks! Ping? -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 05 23:16:26 2023 Received: (at 62339) by debbugs.gnu.org; 6 Apr 2023 03:16:26 +0000 Received: from localhost ([127.0.0.1]:53126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkG6r-0003r7-M7 for submit@debbugs.gnu.org; Wed, 05 Apr 2023 23:16:26 -0400 Received: from dancol.org ([96.126.100.184]:41944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkG6o-0003qu-Bo for 62339@debbugs.gnu.org; Wed, 05 Apr 2023 23:16:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID: Date: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=AsG23ki/fK/S0KSlZTFP/wzoJHiSW/Mytg9fOYmL2uU=; b=O3UnhUgsNxkBvaYtmasm2m3voM klYmwpTgWD3phLdoxPlNDGXJABlBtHMl0e+S0oCU+EJ62MsDV1QeTfDO4jlu8tfv5K4oG0SF3c+lb aVJRXwodiTaDLK4Welw03xaOnhjGrMItus0JWqxlDckIX4t5TfalVQHQZohKnivIyCTgzzbfsGhs/ Jeo/i2aEXRBmPSPsIuPwXwDgw5p0Tq9RllmBZyKAfoiHTUBPGa9gl14bXhbwlaP55oPWJ8neESlYh 4fqhpu4XgUYqq394Nd2Qcdd9V5xK4ONgmB/dzAjinJ6dKj/fZAsrlpcK2D5vXf9yUusxoJ+QnKbnU HDzuHCCw==; Received: from 097-104-088-154.res.spectrum.com ([97.104.88.154]:44354 helo=[192.168.86.235]) by dancol.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1pkG6j-0007NE-Ew; Wed, 05 Apr 2023 20:16:18 -0700 From: Daniel Colascione To: Alan Mackenzie Date: Wed, 05 Apr 2023 23:16:16 -0400 Message-ID: <18754903670.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> In-Reply-To: References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> User-Agent: AquaMail/1.43.0 (build: 104300275) Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="18754909c6571a02829dd3b894" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 62339 Cc: 62339@debbugs.gnu.org, Eli Zaretskii 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: -1.0 (-) This is a multi-part message in MIME format. --18754909c6571a02829dd3b894 Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 8bit On April 5, 2023 11:53:54 Alan Mackenzie wrote: > Hello, Daniel. > > On Thu, Mar 23, 2023 at 14:40:23 +0000, Alan Mackenzie wrote: >> On Wed, Mar 22, 2023 at 18:17:05 -0400, Daniel Colascione wrote: > >>>>>> This problem reproduces for me on latest master with emacs -Q: > >>>>>> ``` >>>>>> TEST(Foo, Bar) { >>>>>> NamedTemporaryDirectory const test_directory; >>>>>> } >>>>>> ``` > >>>>> Thanks. What I see with Emacs built from master is that >>>>> test_directory in the above example gets font-lock-type-face in >>>>> c++-mode (but not in c-mode). With Emacs built from emacs-29, both >>>>> modes produce correct fontification. > >>>>> Alan, can you please look into this? > > [ .... ] > >> It turned out that the bug was caused by a single missing line of code, a >> (c-forward-syntactic-ws) in c-forward-type, so the fix wasn't too >> difficult. I've taken the opportunity also to fix some minor other >> innaccuracies in c-forward-type. > >> Please try the following patch, and either confirm to me that it appears >> to fix the bug, or say what's still wrong. Thanks! > > Ping? Works for me. Thanks! > > -- > Alan Mackenzie (Nuremberg, Germany). --18754909c6571a02829dd3b894 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable


On April 5, 2023 11:53:54 Alan Mackenzie <acm@muc.de&g= t; wrote:

Hello, Daniel.

On Thu, Mar 23, 2023 at 14:40:23 +0000, Alan Mackenzie wr= ote:
On Wed, Mar 22, 2023 at 18:17:05 -0400, Daniel Colascione= wrote:

This problem reproduces for me on latest master with emac= s -Q:

```
TEST(Foo, Bar) {
 NamedTemporaryDirectory const test_directory;
}
```

Thanks.  What I see with Emacs built from master is = that
test_directory in the above example gets font-lock-type-f= ace in
c++-mode (but not in c-mode).  With Emacs built from= emacs-29, both
modes produce correct fontification.

Alan, can you please look into this?

[ .... ]

It turned out that the bug was caused by a single missing= line of code, a 
(c-forward-syntactic-ws) in c-forward-type, so the fix wa= sn't too
difficult.  I've taken the opportunity also to fix s= ome minor other
innaccuracies in c-forward-type.

Please try the following patch, and either confirm to me = that it appears
to fix the bug, or say what's still wrong.  Thanks!<= /div>

Ping?

Works for me. Thanks!

<= div dir=3D"auto">

-- 
Alan Mackenzie (Nuremberg, Germany).

--18754909c6571a02829dd3b894-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 06 05:27:06 2023 Received: (at 62339-done) by debbugs.gnu.org; 6 Apr 2023 09:27:06 +0000 Received: from localhost ([127.0.0.1]:53419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkLtZ-0006Kk-Lf for submit@debbugs.gnu.org; Thu, 06 Apr 2023 05:27:05 -0400 Received: from mx3.muc.de ([193.149.48.5]:63068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkLtT-0006K9-Mb for 62339-done@debbugs.gnu.org; Thu, 06 Apr 2023 05:27:03 -0400 Received: (qmail 13932 invoked by uid 3782); 6 Apr 2023 11:26:54 +0200 Received: from acm.muc.de (pd953a854.dip0.t-ipconnect.de [217.83.168.84]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 06 Apr 2023 11:26:53 +0200 Received: (qmail 4585 invoked by uid 1000); 6 Apr 2023 09:26:53 -0000 Date: Thu, 6 Apr 2023 09:26:53 +0000 To: Daniel Colascione Subject: Re: bug#62339: cc-mode fontifies variables incorrectly when const follows type Message-ID: References: <878rfqcez5.fsf@dancol.org> <837cva6m1e.fsf@gnu.org> <87y1no6f6d.fsf@dancol.org> <83ttyc6cqz.fsf@gnu.org> <87lejo1ldz.fsf@dancol.org> <18754903670.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18754903670.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62339-done Cc: 62339-done@debbugs.gnu.org, acm@muc.de, Eli Zaretskii 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: -1.0 (-) Hello, Daniel. On Wed, Apr 05, 2023 at 23:16:16 -0400, Daniel Colascione wrote: > On April 5, 2023 11:53:54 Alan Mackenzie wrote: > > On Thu, Mar 23, 2023 at 14:40:23 +0000, Alan Mackenzie wrote: [ .... ] > >> Please try the following patch, and either confirm to me that it > >> appears to fix the bug, or say what's still wrong. Thanks! > > Ping? > Works for me. Thanks! Thanks! I've committed the patch and I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 15 15:31:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 04 May 2023 11:24:06 +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