From unknown Sat Jun 21 10:40:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#59427 <59427@debbugs.gnu.org> To: bug#59427 <59427@debbugs.gnu.org> Subject: Status: CC Mode 5.35.2 (C/*l); More bad fontification Reply-To: bug#59427 <59427@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:40:19 +0000 retitle 59427 CC Mode 5.35.2 (C/*l); More bad fontification reassign 59427 cc-mode submitter 59427 Po Lu severity 59427 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 20 21:32:49 2022 Received: (at submit) by debbugs.gnu.org; 21 Nov 2022 02:32:49 +0000 Received: from localhost ([127.0.0.1]:44975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owwc5-0003sn-4O for submit@debbugs.gnu.org; Sun, 20 Nov 2022 21:32:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:42638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owwbz-0003sa-7O for submit@debbugs.gnu.org; Sun, 20 Nov 2022 21:32:48 -0500 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 1owwby-0002AF-Uz for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 21:32:42 -0500 Received: from sonic301-30.consmr.mail.ne1.yahoo.com ([66.163.184.199]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1owwbw-00082d-KY for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 21:32:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668997957; bh=WcHFXMJyi0r28BCkwgPuj7dnTUTlHRQMkX3JscpzWYQ=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=odNXPSCfyFFPrnyY3e5PNHquzBc0ZR8vqAmpo8Pw+UkRvmmTa3R7NjRdgzWWkcaWviaauoFamwV8IWLoEgiBnOLi8wDt3WRKC6WHCS/VgIPXT41LP3tduhqd7QszG2m83XxD4RFM51PU7JBPaZbNDW3AORy4IH6pjzh3DwdnHxdfsrN1kv35dO253j24JtNdGeeEqt7u2D2ak7AGPNUy3SgZSHiqefuZyvPO6UbzBTAWeR+LHLeZyloVLdgxdcEW5obU9I/6iCp8KxPD1NndaNJhBWkQkArVS0k1QLbPrmIpMOJXY4vw0cv6SunljAAXnV++tC9AyultlkI2SdbyCw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668997957; bh=E7qtfMhDb6/ucqFJ83EVbK4Vs/jzKG0IN3xtLhHmHLi=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=lyBtLZFlQGa+h52NtqciyfFgPTQ21p0/ZDuQNkaM8TRYbj5DSLX4vOYXJ4t4+11HdMsm4bRFb+o88vUXT4oNeqfbc3xfUPyCVKu1cbqiKm2DRls8osZrLKeJ317PqU4wsJ1qJg3DUA5S30AQmtuVEVOHWChuFOAnREt2yvl+RaV8+HrcKVfu1rji2yYWoS9dQZZKgXFx7j1cmSxPkcMB0cUyJQkuUnW9TcVLZQtYtbpVaHGNX/PykXOafwP+wd6QKe23Wn34uVt77GaIHXe1gl/U2PNoKj5m3CBacrl+f9JKIHvK3VMHBdyD6wd0MG51wbgtL4cEACX0+H9xiaZ7Yw== X-YMail-OSG: lmYpYtsVM1kUWr.s5DwHN1JF3VpGCl_okJdY2te14BZvLM0.xiRFBvY0rtsAcHo VdPZMLV3MsB37dQte9hrKHpJL7HzPxWI4zV2SlsRwx76brZWT8DvEtCD.6hvKx_k9Qcx7LPznqh1 GZaY0_pq5ZQXbZoB.bpf3AeRHnkP0vOu5ETH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PjUdNA-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Mon, 21 Nov 2022 02:32:37 +0000 Received: by hermes--production-sg3-6c8895b545-mvhb5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c78e06b21d9a330c0390b9822d0340fe; Mon, 21 Nov 2022 02:32:30 +0000 (UTC) From: Po Lu To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.35.2 (C/*l); More bad fontification X-Debbugs-Package: cc-mode Date: Mon, 21 Nov 2022 10:32:26 +0800 Message-ID: <87bkp16nr9.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <87bkp16nr9.fsf.ref@yahoo.com> X-Mailer: WebService/1.1.20863 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 4926 Received-SPF: pass client-ip=66.163.184.199; envelope-from=luangruo@yahoo.com; helo=sonic301-30.consmr.mail.ne1.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: -0.6 (/) 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: -1.6 (-) Package: cc-mode Insert the following text in a c-mode buffer: static uint64_t ConfineTime (uint64_t time) { uint32_t milliseconds; /* Given a microsecond time, confine the millisecond part to CARD32. */ milliseconds =3D time / 1000; return (milliseconds * (uint64_t) 1000 + time % 1000); } Notice how "milliseconds" is recognized as a type, and the uint64_t in the cast as an identifier. Emacs : GNU Emacs 29.0.50 (build 236, x86_64-pc-linux-gnu) of 2022-11-21 Package: CC Mode 5.35.2 (C/*l) Buffer Style: gnu c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-st= ring-delim gen-comment-delim syntax-properties category-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 0) c-indent-comment-alist '((anchored-comment column . 0) (end-block space . = 1) (cpp-end-block space . 2)) c-indent-comments-syntactically-p nil c-block-comment-prefix "" c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+") (other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc) (c++-mode . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-nonempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook '(t c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call + ) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist ) (arglist-cont c-lineup-gcc-asm-reg 0) (comment-intro c-lineup-knr-region-comment c-lineup-comment ) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont ) (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ + ) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (statement-block-intro . +) ) c-buffer-is-cc-mode 'c-mode c-tab-always-indent t c-syntactic-indentation t c-syntactic-indentation-in-macros t c-ignore-auto-fill '(string cpp code) c-auto-align-backslashes t c-backspace-function 'backward-delete-char-untabify c-delete-function 'delete-char c-electric-pound-behavior nil c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu")) c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 8 comment-column 32 parse-sexp-ignore-comments t parse-sexp-lookup-properties t auto-fill-function nil comment-multi-line t comment-start-skip "\\(?://+\\|/\\*+\\)\\s *" fill-prefix nil fill-column 70 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-=E2=80=93!|#%= ;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*\\)*\\)" ) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 07:56:54 2022 Received: (at 59427) by debbugs.gnu.org; 24 Nov 2022 12:56:54 +0000 Received: from localhost ([127.0.0.1]:57665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyBmf-00044L-NO for submit@debbugs.gnu.org; Thu, 24 Nov 2022 07:56:54 -0500 Received: from mx3.muc.de ([193.149.48.5]:50578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyBma-000445-NN for 59427@debbugs.gnu.org; Thu, 24 Nov 2022 07:56:52 -0500 Received: (qmail 33362 invoked by uid 3782); 24 Nov 2022 13:56:41 +0100 Received: from acm.muc.de (p4fe158b1.dip0.t-ipconnect.de [79.225.88.177]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 24 Nov 2022 13:56:41 +0100 Received: (qmail 26625 invoked by uid 1000); 24 Nov 2022 12:56:40 -0000 Date: Thu, 24 Nov 2022 12:56:40 +0000 To: Po Lu Subject: Re: bug#59427: CC Mode 5.35.2 (C/*l); More bad fontification Message-ID: References: <87bkp16nr9.fsf.ref@yahoo.com> <87bkp16nr9.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Jfuzj+0OPjjfQZue" Content-Disposition: inline In-Reply-To: <87bkp16nr9.fsf@yahoo.com> 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: 59427 Cc: 59427@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 (-) --Jfuzj+0OPjjfQZue Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Po. On Mon, Nov 21, 2022 at 10:32:26 +0800, Po Lu via CC-Mode-help wrote: > Package: cc-mode > Insert the following text in a c-mode buffer: > static uint64_t > ConfineTime (uint64_t time) > { > uint32_t milliseconds; > /* Given a microsecond time, confine the millisecond part to > CARD32. */ > milliseconds = time / 1000; > return (milliseconds * (uint64_t) 1000 > + time % 1000); > } > Notice how "milliseconds" is recognized as a type, and the uint64_t in > the cast as an identifier. Yes. Here the "symmetric space" criterion for * was buggy. That criterion says if there is whitespace on neither side of the *, or both, it is a multiplication sign. Otherwise it is the indirection operator. The bug was not taking the ( properly into account. Please apply the attached patch, which should fix this, and confirm it works OK. Thanks! > Emacs : GNU Emacs 29.0.50 (build 236, x86_64-pc-linux-gnu) > of 2022-11-21 > Package: CC Mode 5.35.2 (C/*l) > Buffer Style: gnu > c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties category-properties 1-bit) [ .... ] -- Alan Mackenzie (Nuremberg, Germany). --Jfuzj+0OPjjfQZue Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="diff.20221123.diff" diff -r d37a87d7240d cc-engine.el --- a/cc-engine.el Thu Nov 17 10:20:00 2022 +0000 +++ b/cc-engine.el Wed Nov 23 12:48:03 2022 +0000 @@ -11096,8 +11096,9 @@ at-decl-start)) (let ((space-before-id (save-excursion - (goto-char name-start) - (or (bolp) (memq (char-before) '(?\ ?\t))))) + (goto-char id-start) + (and (> (skip-chars-forward "* \t\n\r") 0) + (memq (char-before) '(?\ ?\t ?\n ?\r))))) (space-after-type (save-excursion (goto-char type-start) @@ -11107,6 +11108,8 @@ (memq (char-after) '(?\ ?\t))))))) (when (not (eq (not space-before-id) (not space-after-type))) + (when (eq at-type 'maybe) + (setq unsafe-maybe t)) (setq maybe-expression t) (throw 'at-decl-or-cast t))))) --Jfuzj+0OPjjfQZue-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 19:38:12 2022 Received: (at 59427) by debbugs.gnu.org; 25 Nov 2022 00:38:12 +0000 Received: from localhost ([127.0.0.1]:60612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyMjL-0002yC-RK for submit@debbugs.gnu.org; Thu, 24 Nov 2022 19:38:12 -0500 Received: from sonic306-22.consmr.mail.ne1.yahoo.com ([66.163.189.84]:33756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyMjJ-0002xv-2S for 59427@debbugs.gnu.org; Thu, 24 Nov 2022 19:38:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1669336681; bh=kvD0Ln0Z6cQvRiXJ/ZwbicpHM0J5xrpFUgPEi5dI+mc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Td6wNbzma1uVzaQUkAZvxplpPmc4DDiCu9VnFZ7t+DSAwRaZ62XkaegwDwuBS2v1bxXcnvS53TO9Hldh/TFkBm9jLd8UcBtEVMMEh8sC8XO6gqFlA1+YcFjsznLLmoeeLv6vlqZEiM9LPStj+D+rTqd7PNCjhQ44CtJV7ODbiOW7sQk/MyMGsM451S2N0PefV+wZTyXgU3hHxfxAl2RJxegitubBx5jUcWqbEoxrADEUSebUIkJHBG9c7Krf7eX8nU5br7QANAVEEzCBVfqhHRUaeJAbAjBi6wbV1BuKlRLXw8jexdgyK0OFt39jfeayOGHz0UyUaSK8jP33248evg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1669336681; bh=hTo/IsubyD3jPUd//vzpad4plNtdw3ebrZtwsVIvPKs=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=NAMya+R20u8IZZAiQrqp2XmsWwhLOaN8/SBT1PW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gZGm0ux8wsmAGHrvCmBzXnmARaicoJIosJUmwBVTWG9jXQYrkaF4k7Sdc8G 6B1lVJIaG9x5CY03IIX4IJVI_EvRwVwlI9.76UYLxWeqxH623zP62DIApzniTux6uhxylRjJ6lCX EtZjfxSObVO440QS6bkASwr2LvYg4GCN2fyDirbUhTSDToiF7CV_..vigUJq0RLDYBVqGj8qcHcP AV6lqCcFdZ5vHNLmhaDjx5OlAFl_Ddfefep3EsweeX2JNiwjmoqAzNKtnF2CjvAVwDgDE2W4ig8W jhDK2xLT8pd0IX51lBPIwqiW7i8QGZCQ2GO10Wa21k2v6yPyJ2ts_ahR2aj40lzJ78_bUmwldlny huRESbUSvAzqc2qtQZL3NLNkfYYUKYgosLlrg9iU0M8Ab4O5RGPlyBzK0DOQ4U.1DVK0z13aWqk6 DKM3NdemGDaY2lm65bi7v6HwqegV4WYi2aEbmueTMUuleFgUY3rGNl2E_aseh9htyC6ji.fku X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Fri, 25 Nov 2022 00:38:01 +0000 Received: by hermes--production-sg3-6c8895b545-w24b9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1e2143030a557b82c7d3caab2b4de4a8; Fri, 25 Nov 2022 00:37:55 +0000 (UTC) From: Po Lu To: Alan Mackenzie Subject: Re: bug#59427: CC Mode 5.35.2 (C/*l); More bad fontification In-Reply-To: (Alan Mackenzie's message of "Thu, 24 Nov 2022 12:56:40 +0000") References: <87bkp16nr9.fsf.ref@yahoo.com> <87bkp16nr9.fsf@yahoo.com> Date: Fri, 25 Nov 2022 08:37:48 +0800 Message-ID: <87a64fzx5v.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20863 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 966 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59427 Cc: 59427@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 (-) Alan Mackenzie writes: > Hello, Po. > > On Mon, Nov 21, 2022 at 10:32:26 +0800, Po Lu via CC-Mode-help wrote: >> Package: cc-mode > >> Insert the following text in a c-mode buffer: > >> static uint64_t >> ConfineTime (uint64_t time) >> { >> uint32_t milliseconds; > >> /* Given a microsecond time, confine the millisecond part to >> CARD32. */ >> milliseconds = time / 1000; > >> return (milliseconds * (uint64_t) 1000 >> + time % 1000); >> } > >> Notice how "milliseconds" is recognized as a type, and the uint64_t in >> the cast as an identifier. > > Yes. Here the "symmetric space" criterion for * was buggy. That > criterion says if there is whitespace on neither side of the *, or both, > it is a multiplication sign. Otherwise it is the indirection operator. > > The bug was not taking the ( properly into account. Please apply the > attached patch, which should fix this, and confirm it works OK. Thanks! It does, thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 22:20:53 2022 Received: (at 59427) by debbugs.gnu.org; 25 Nov 2022 03:20:53 +0000 Received: from localhost ([127.0.0.1]:32865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyPGm-0005uR-R3 for submit@debbugs.gnu.org; Thu, 24 Nov 2022 22:20:53 -0500 Received: from md5i.com ([75.151.244.229]:47374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyPGk-0005uC-1Q for 59427@debbugs.gnu.org; Thu, 24 Nov 2022 22:20:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=qn53Ma+T3roSGcPcrtW0SG588Urk/DEmzPspMlg6j/c=; b=Dh1WFeC0WsMrqfU2yUGb93rvNn aszziyCHvDhQSUY11zY5G2vg4Bw/IHR8mzu8xFcAdSbMT++VHLqI8kxqt2NLtFMuwXygzyM/LwBFa 8o5mzEq8vPiFlq6WmsUGuJAU8; Received: from abode ([192.168.177.1]:45036 helo=miko) by md5i.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oyPGc-008nDo-1f; Thu, 24 Nov 2022 22:20:42 -0500 From: Michael Welsh Duggan To: Alan Mackenzie Subject: Re: bug#59427: CC Mode 5.35.2 (C/*l); More bad fontification In-Reply-To: (Alan Mackenzie's message of "Thu, 24 Nov 2022 12:56:40 +0000") References: <87bkp16nr9.fsf.ref@yahoo.com> <87bkp16nr9.fsf@yahoo.com> Date: Thu, 24 Nov 2022 22:20:42 -0500 Message-ID: <87wn7jvhx1.fsf@md5i.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59427 Cc: Po Lu , 59427@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 (-) Alan Mackenzie writes: > Hello, Po. > > On Mon, Nov 21, 2022 at 10:32:26 +0800, Po Lu via CC-Mode-help wrote: >> Package: cc-mode > >> Insert the following text in a c-mode buffer: > >> static uint64_t >> ConfineTime (uint64_t time) >> { >> uint32_t milliseconds; > >> /* Given a microsecond time, confine the millisecond part to >> CARD32. */ >> milliseconds = time / 1000; > >> return (milliseconds * (uint64_t) 1000 >> + time % 1000); >> } > >> Notice how "milliseconds" is recognized as a type, and the uint64_t in >> the cast as an identifier. > > Yes. Here the "symmetric space" criterion for * was buggy. That > criterion says if there is whitespace on neither side of the *, or both, > it is a multiplication sign. Otherwise it is the indirection operator. > > The bug was not taking the ( properly into account. Please apply the > attached patch, which should fix this, and confirm it works OK. Thanks! Oh dear. My personal programming style uses a "type * name" spacing for pointers. (More specifically, I put spaces on either side of "*", "&" or "&&" when used to form types.) Is this going to cause me problems in the future? -- Michael Welsh Duggan (md5i@md5i.com) From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 04:54:05 2022 Received: (at 59427-done) by debbugs.gnu.org; 25 Nov 2022 09:54:05 +0000 Received: from localhost ([127.0.0.1]:33556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyVPJ-0003sL-5G for submit@debbugs.gnu.org; Fri, 25 Nov 2022 04:54:05 -0500 Received: from mx3.muc.de ([193.149.48.5]:32892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyVPH-0003rm-96 for 59427-done@debbugs.gnu.org; Fri, 25 Nov 2022 04:54:04 -0500 Received: (qmail 86908 invoked by uid 3782); 25 Nov 2022 10:53:56 +0100 Received: from acm.muc.de (p4fe1573d.dip0.t-ipconnect.de [79.225.87.61]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 25 Nov 2022 10:53:56 +0100 Received: (qmail 4681 invoked by uid 1000); 25 Nov 2022 09:53:55 -0000 Date: Fri, 25 Nov 2022 09:53:55 +0000 To: Po Lu Subject: Re: bug#59427: CC Mode 5.35.2 (C/*l); More bad fontification Message-ID: References: <87bkp16nr9.fsf.ref@yahoo.com> <87bkp16nr9.fsf@yahoo.com> <87a64fzx5v.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a64fzx5v.fsf@yahoo.com> 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: 59427-done Cc: 59427-done@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 (-) Hello, Po. On Fri, Nov 25, 2022 at 08:37:48 +0800, Po Lu wrote: > Alan Mackenzie writes: > > On Mon, Nov 21, 2022 at 10:32:26 +0800, Po Lu via CC-Mode-help wrote: > >> Package: cc-mode > >> Insert the following text in a c-mode buffer: > >> static uint64_t > >> ConfineTime (uint64_t time) > >> { > >> uint32_t milliseconds; > >> /* Given a microsecond time, confine the millisecond part to > >> CARD32. */ > >> milliseconds = time / 1000; > >> return (milliseconds * (uint64_t) 1000 > >> + time % 1000); > >> } > >> Notice how "milliseconds" is recognized as a type, and the uint64_t in > >> the cast as an identifier. > > Yes. Here the "symmetric space" criterion for * was buggy. That > > criterion says if there is whitespace on neither side of the *, or both, > > it is a multiplication sign. Otherwise it is the indirection operator. > > The bug was not taking the ( properly into account. Please apply the > > attached patch, which should fix this, and confirm it works OK. Thanks! > It does, thanks. Thanks! I've committed the patch, and I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 05:06:11 2022 Received: (at 59427) by debbugs.gnu.org; 25 Nov 2022 10:06:11 +0000 Received: from localhost ([127.0.0.1]:33576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyVb1-0004Br-0b for submit@debbugs.gnu.org; Fri, 25 Nov 2022 05:06:11 -0500 Received: from mx3.muc.de ([193.149.48.5]:33268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyVay-0004Bc-7F for 59427@debbugs.gnu.org; Fri, 25 Nov 2022 05:06:08 -0500 Received: (qmail 33954 invoked by uid 3782); 25 Nov 2022 11:06:00 +0100 Received: from acm.muc.de (p4fe1573d.dip0.t-ipconnect.de [79.225.87.61]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 25 Nov 2022 11:06:00 +0100 Received: (qmail 4696 invoked by uid 1000); 25 Nov 2022 10:05:59 -0000 Date: Fri, 25 Nov 2022 10:05:59 +0000 To: Michael Welsh Duggan Subject: Re: bug#59427: CC Mode 5.35.2 (C/*l); More bad fontification Message-ID: References: <87bkp16nr9.fsf.ref@yahoo.com> <87bkp16nr9.fsf@yahoo.com> <87wn7jvhx1.fsf@md5i.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wn7jvhx1.fsf@md5i.com> 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: 59427 Cc: Po Lu , 59427@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 (-) Hello, Michael. On Thu, Nov 24, 2022 at 22:20:42 -0500, Michael Welsh Duggan wrote: > Alan Mackenzie writes: > > Hello, Po. > > On Mon, Nov 21, 2022 at 10:32:26 +0800, Po Lu via CC-Mode-help wrote: > >> Package: cc-mode > >> Insert the following text in a c-mode buffer: > >> static uint64_t > >> ConfineTime (uint64_t time) > >> { > >> uint32_t milliseconds; > >> /* Given a microsecond time, confine the millisecond part to > >> CARD32. */ > >> milliseconds = time / 1000; > >> return (milliseconds * (uint64_t) 1000 > >> + time % 1000); > >> } > >> Notice how "milliseconds" is recognized as a type, and the uint64_t in > >> the cast as an identifier. > > Yes. Here the "symmetric space" criterion for * was buggy. That > > criterion says if there is whitespace on neither side of the *, or both, > > it is a multiplication sign. Otherwise it is the indirection operator. > > The bug was not taking the ( properly into account. Please apply the > > attached patch, which should fix this, and confirm it works OK. Thanks! > Oh dear. My personal programming style uses a "type * name" spacing for > pointers. (More specifically, I put spaces on either side of "*", "&" > or "&&" when used to form types.) Is this going to cause me problems in > the future? Not if it hasn't done already. The mechanism has been in place since 2017-03, a slight bug in it has just been corrected. This criterion for distinguishing a multiplication operator from an indirection operator is only used as a last ditch, when everything else has failed to decide. C and C++ are not comfortable languages to parse with anything less than a full compiler. > -- > Michael Welsh Duggan > (md5i@md5i.com) -- Alan Mackenzie (Nuremberg, Germany). From unknown Sat Jun 21 10:40:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 23 Dec 2022 12:24:09 +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