From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 28 03:05:32 2023 Received: (at submit) by debbugs.gnu.org; 28 Jun 2023 07:05:32 +0000 Received: from localhost ([127.0.0.1]:49945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEPF6-0002ek-21 for submit@debbugs.gnu.org; Wed, 28 Jun 2023 03:05:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:39164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEPF1-0002eX-Ns for submit@debbugs.gnu.org; Wed, 28 Jun 2023 03:05:31 -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 1qEPEz-0008OB-Pf for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 03:05:26 -0400 Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEPEw-0002Wz-By for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 03:05:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687935913; bh=937n7Ro+YkMYjZsapipcI7xBIogd8E0Xq5cevSnPTP0=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=WWH+e5iUkBlL7SISuoDqBwgNGgafS9UQ/CSjPdLHXpkCOnrc1YS4/gMY+lFgjIKguSuDwFOgn3cUs32jwguvtyJ1t0HVTtD0z/fczwHjcp86OO+JrDOVTatHkDYaVfAeeyu/aN1AJPAhmO7tcYdEBBNbLD5UDOAPF6r7ZEHtxw0hcoIjppRfqhChmYJdfANeFfcPiAlE/N/23W3p9G1oUppQfRqe6maTRZlbgYxlmZNiz+jDEsr+5IRxCXT6T/PYDlJglqFWd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CMGmeqQI8dOkuCFgTvipa_f7VqJNdh7DudpD9 BAd0OqatBPOBHxOZafRCZx4TLmDDbnjk9M7h_uomc79m31UQn14Nxu7OnsvwvFVvH7FebyXCzOYk wwY0iH25FRpSUZwalciLtJKjcFk9yK6MHiKz2BZJ4y2F5MFk0gtdpLW4VRXoVRAlxE63EyEhPHl8 Q8UJQktBrlrj3HE9mSgBMMFw6nS8fppt1bl0A77dWuKs5T7cy2TTNYz54lgcFjYc54pcuNpo2QGC XDVggYkmEjdfKACdDy9I8p34b16.lgbnkDLOEzVTxqQ69VVKpys5lEXoprUhlh_QbOO9KIHA_bWx B92rm_C0xwZuUXBhaoGRfYaNKL1fBlgeeTw2XuywgavopiPajF75myIZj7hRNh1DiO3Wp9MVWhZb iMrH3Hsblxo7Gl9fdq1TRJcHJdHbJ4EeGaieK9RgdDBRwezVLlVqc7NvPJdElxggsSc.1kld1qq8 G.n5ukOeWGEvdBkxTiIqDb2EnieNYaG9cFQwP7behcr6Um548qShmtGROunwUBTxO_rbGB2mQ6xV Q.hhxfF5rzCf1iw_EwmlKPC0nNZHi.TN_ZVCAHnz50UGjDz7VVJgJ1QTdZQsMaQCJ895Z77suTtH wW5qGXR9l0GZXEGV6ICtKAKO7YRpuGB8VwD7gTmzJjnNDLw7.jtAZ05DB3NA2FtBRgKWaJf3ZgDl V04V_XOWGfnjSRtSRmaSLrFjesZS5Lp1Pdfjs49y.21lOQZUnOA-- X-Sonic-MF: X-Sonic-ID: 21865d04-b0ee-4017-b2b4-4a4fa7f00a52 Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Wed, 28 Jun 2023 07:05:13 +0000 Received: by hermes--production-sg3-67fd64777-vq8mf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 044fe1befbf7385532895db4a28faf2b; Wed, 28 Jun 2023 07:05:08 +0000 (UTC) From: Po Lu To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.35.2 (C/*l); More incorrect type recognition X-Debbugs-Package: cc-mode Date: Wed, 28 Jun 2023 15:05:03 +0800 Message-ID: <878rc46p9c.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <878rc46p9c.fsf.ref@yahoo.com> X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 4749 Received-SPF: pass client-ip=66.163.189.82; envelope-from=luangruo@yahoo.com; helo=sonic306-20.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, T_SCC_BODY_TEXT_LINE=-0.01 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 I just encountered a new instance of CC Mode misrecognizing identifiers as types. In a C Mode buffer, insert: void add_property (name, expression) then, type: RET TAB s t r u c t SPC e x p r e s s i o n SPC e x p r e s s i o n ; `expression' will then be fontified as a type within the function declarator's identifier list! Thanks in advance. Emacs : GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu) of 2023-06-25 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-no= nempty)) 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-DEF= UN-intro-cont) (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-c= lass-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 Fri Jun 30 15:47:15 2023 Received: (at 64322) by debbugs.gnu.org; 30 Jun 2023 19:47:15 +0000 Received: from localhost ([127.0.0.1]:55819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFK5L-0007jD-2w for submit@debbugs.gnu.org; Fri, 30 Jun 2023 15:47:15 -0400 Received: from mx3.muc.de ([193.149.48.5]:28616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFK5I-0007iy-Tp for 64322@debbugs.gnu.org; Fri, 30 Jun 2023 15:47:13 -0400 Received: (qmail 8947 invoked by uid 3782); 30 Jun 2023 21:47:06 +0200 Received: from acm.muc.de (pd953a9e9.dip0.t-ipconnect.de [217.83.169.233]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 30 Jun 2023 21:47:05 +0200 Received: (qmail 25078 invoked by uid 1000); 30 Jun 2023 19:47:05 -0000 Date: Fri, 30 Jun 2023 19:47:05 +0000 To: Po Lu Subject: Re: bug#64322: CC Mode 5.35.2 (C/*l); More incorrect type recognition Message-ID: References: <878rc46p9c.fsf.ref@yahoo.com> <878rc46p9c.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="u+aMnTljtvbVLwd7" Content-Disposition: inline In-Reply-To: <878rc46p9c.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: 64322 Cc: 64322@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 (-) --u+aMnTljtvbVLwd7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Po. On Wed, Jun 28, 2023 at 15:05:03 +0800, Po Lu via CC-Mode-help wrote: > Package: cc-mode > I just encountered a new instance of CC Mode misrecognizing identifiers > as types. In a C Mode buffer, insert: > void > add_property (name, expression) > then, type: > RET TAB s t r u c t SPC e x p r e s s i o n SPC e x p r e s s i o n ; > `expression' will then be fontified as a type within the function > declarator's identifier list! Yes. The problem was a confusion between C++ and C regarding type definition. In C++, "class Foo" or "struct Foo" defines a type "Foo". In C, in "struct Foo", there is no such type defined, "Foo" is merely a struct tag. This involves a one line fix in cc-langs.el, to remove items from the lang const c-typeless-decl-kwds. Additionally, I've corrected an unrelated typo in cc-fonts.el. Would you please try out the attached patch in your real code thoroughly, and either confirm the bug is fixed, or tell me what's still wrong. Thanks! > Thanks in advance. > Emacs : GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu) > of 2023-06-25 > 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). --u+aMnTljtvbVLwd7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="diff.20230630.diff" diff -r 0e3ab44d5a46 cc-fonts.el --- a/cc-fonts.el Wed Jun 28 18:17:13 2023 +0000 +++ b/cc-fonts.el Fri Jun 30 19:25:37 2023 +0000 @@ -2309,7 +2309,7 @@ (c-forward-syntactic-ws)) (goto-char (match-end ,type-match)))))))) - ;; Fontify special declarations that lacks a type. + ;; Fontify special declarations that lack a type. ,@(when (c-lang-const c-typeless-decl-kwds) `((,(c-make-font-lock-search-function (concat "\\<\\(" diff -r 0e3ab44d5a46 cc-langs.el --- a/cc-langs.el Wed Jun 28 18:17:13 2023 +0000 +++ b/cc-langs.el Fri Jun 30 19:25:37 2023 +0000 @@ -2584,6 +2584,7 @@ ;; {...}"). t (append (c-lang-const c-class-decl-kwds) (c-lang-const c-brace-list-decl-kwds)) + (c objc) nil ;; Note: "manages" for CORBA CIDL clashes with its presence on ;; `c-type-list-kwds' for IDL. idl (append (c-lang-const c-typeless-decl-kwds) --u+aMnTljtvbVLwd7-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 30 20:22:55 2023 Received: (at 64322) by debbugs.gnu.org; 1 Jul 2023 00:22:55 +0000 Received: from localhost ([127.0.0.1]:56002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFOO6-0006aS-Tp for submit@debbugs.gnu.org; Fri, 30 Jun 2023 20:22:55 -0400 Received: from sonic302-22.consmr.mail.ne1.yahoo.com ([66.163.186.148]:46792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFOO5-0006aG-IS for 64322@debbugs.gnu.org; Fri, 30 Jun 2023 20:22:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688170968; bh=GnIReNRSOkiLRge+/29NkTPOrSF0LZi9oB9ZMOf7m+o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=IfSZpS0V24tUNLE7Ot538WlTcmxNQ+3IEe5AomHBDLLWjfvpF7wBsmOYh1P6sVN2x8AwRSiJzGcSAAro2oO7dSo3fjVEmtuW1JEjVgeWhnBaT106vKFap1ET3C0yjEgcZpzPOcU+vDAjLXsaBwjBqOQ+RXrC+Y/1sxJMYsfKYbIg4fL7yELDgcnIVzacNu81VouRDiKg29IW0mWmJcrzMuz+S1p2cedXOydQ8UiGpjIZ/EVm0J/Na8+rvulE+wa4xw86Zkx32MqVQRz15IK225zes+84iCDZN64rw4EcneaosQYSkV3xhNrq68/TZ0FppKpZISiweUs5UD0XYb2mTQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688170968; bh=hbjO0j784VN+O136ALH7zxTTceEfIfKPixou6oeWzie=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=LD+KC7cEpbO4iIb/3TAvmuezy6xPNOn5xTorZ6K51VUpgj0e2mMQRvxMcwCoY1sLsXmiBzIe6utV16mkCHynA1awq2EmetBkHgjtxYqujy0UIsxyRWslzVEq0yCy8tpOoSu5osES7yYspg/daRjtqn2ltXTKzge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bNzS2AvUQcA2zWKsk9SmxteybSaxi 9rYZ9Yenokmzvd79_ZVbjxvJQO3Mt2CxN4i.hl5KKZJPIhcnkVs.b4aK8UAFAQgvGPGc2GXzioQJ EnInI1U30XlDp8LCvotIf2Dj14emd2iLBa6vdxJvtE2FME5Ol5AWt4kT1lOnuNxgyNP8YH2bNUtS 7s9QHRUdCSTdXvVA4OdPer97nZ6J05LKejlU5tvNlWrrNN8mhggVEbqRDAZvYL585aGwnzIAPE5O KaXyEnPyeRW2O.8hcT_LSFkCQlWW.Q_xy9Fi03rTfc27_Pvi6RGLSKb_VGE96xqFAwne_sHnFl4J PdpF7_BKed1H4IN8tr6Zb0Hp.Fv1jIqjgJqTmhkUYYkzWhD1SfY0cvvhSRQ-- X-Sonic-MF: X-Sonic-ID: 6894ad39-b4ab-4811-95cd-09c5dd91dcae Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Sat, 1 Jul 2023 00:22:48 +0000 Received: by hermes--production-sg3-67fd64777-z82qw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1a394c67d2679e82de7824cb91420c44; Sat, 01 Jul 2023 00:22:45 +0000 (UTC) From: Po Lu To: Alan Mackenzie Subject: Re: bug#64322: CC Mode 5.35.2 (C/*l); More incorrect type recognition In-Reply-To: (Alan Mackenzie's message of "Fri, 30 Jun 2023 19:47:05 +0000") References: <878rc46p9c.fsf.ref@yahoo.com> <878rc46p9c.fsf@yahoo.com> Date: Sat, 01 Jul 2023 08:22:41 +0800 Message-ID: <87wmzk4h0u.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21612 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1460 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64322 Cc: Eli Zaretskii , 64322@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 Wed, Jun 28, 2023 at 15:05:03 +0800, Po Lu via CC-Mode-help wrote: >> Package: cc-mode > >> I just encountered a new instance of CC Mode misrecognizing identifiers >> as types. In a C Mode buffer, insert: > >> void >> add_property (name, expression) > >> then, type: > >> RET TAB s t r u c t SPC e x p r e s s i o n SPC e x p r e s s i o n ; > >> `expression' will then be fontified as a type within the function >> declarator's identifier list! > > Yes. The problem was a confusion between C++ and C regarding type > definition. In C++, "class Foo" or "struct Foo" defines a type "Foo". > In C, in "struct Foo", there is no such type defined, "Foo" is merely a > struct tag. > > This involves a one line fix in cc-langs.el, to remove items from the > lang const c-typeless-decl-kwds. Additionally, I've corrected an > unrelated typo in cc-fonts.el. > > Would you please try out the attached patch in your real code > thoroughly, and either confirm the bug is fixed, or tell me what's still > wrong. Thanks! > >> Thanks in advance. > >> Emacs : GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu) >> of 2023-06-25 >> 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) Seems to work here, thanks. Eli, could we have this on the emacs-29 branch? From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 03:10:22 2023 Received: (at 64322) by debbugs.gnu.org; 1 Jul 2023 07:10:22 +0000 Received: from localhost ([127.0.0.1]:56283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFUkQ-0000gq-9A for submit@debbugs.gnu.org; Sat, 01 Jul 2023 03:10:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFUkO-0000gb-OR for 64322@debbugs.gnu.org; Sat, 01 Jul 2023 03:10:21 -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 1qFUkI-0003aW-Ry; Sat, 01 Jul 2023 03:10:14 -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=m9q6qUV1RrWzd+9Gr5zgQWp/vFcqwfnyD0aTpxia0Xk=; b=GPV2oFYfwFKI EyVm2jEkeL1ZcPofkkmNqS18AanURE3nUoMKga0HiruARosiR26NLfERbQajccpyMHq49j5XvhrzF IJ6IhnFYK/FbeENn/MehCiJsja7COZoxtpBG3QXOn05oShbA+YhMlP04K6gvw9SwVct1I+qwRIFd4 kUfWAD9I3bpXdu99JqQUTwyXMUradgWxM64iNvFJyv2vfn/3imjxdfZTQA0hEOV2sXRVsA7URsH9U vvBrfgnrertqJhMkJPx6F5+gDCd+TvPnz5gH3LFUe4L2YIrkBheVTlv2TgyKCfLqQktLQ86k1VnVd Y8gnZSiY9nFGGb2xXFuj+w==; 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 1qFUkH-0007fi-QZ; Sat, 01 Jul 2023 03:10:14 -0400 Date: Sat, 01 Jul 2023 10:10:45 +0300 Message-Id: <834jmortsa.fsf@gnu.org> From: Eli Zaretskii To: Po Lu In-Reply-To: <87wmzk4h0u.fsf@yahoo.com> (message from Po Lu on Sat, 01 Jul 2023 08:22:41 +0800) Subject: Re: bug#64322: CC Mode 5.35.2 (C/*l); More incorrect type recognition References: <878rc46p9c.fsf.ref@yahoo.com> <878rc46p9c.fsf@yahoo.com> <87wmzk4h0u.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64322 Cc: acm@muc.de, 64322@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: Po Lu > Cc: 64322@debbugs.gnu.org, Eli Zaretskii > Date: Sat, 01 Jul 2023 08:22:41 +0800 > > Alan Mackenzie writes: > > > Yes. The problem was a confusion between C++ and C regarding type > > definition. In C++, "class Foo" or "struct Foo" defines a type "Foo". > > In C, in "struct Foo", there is no such type defined, "Foo" is merely a > > struct tag. > > > > This involves a one line fix in cc-langs.el, to remove items from the > > lang const c-typeless-decl-kwds. Additionally, I've corrected an > > unrelated typo in cc-fonts.el. > > > > Would you please try out the attached patch in your real code > > thoroughly, and either confirm the bug is fixed, or tell me what's still > > wrong. Thanks! > > > >> Thanks in advance. > > > >> Emacs : GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu) > >> of 2023-06-25 > >> 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) > > Seems to work here, thanks. Eli, could we have this on the emacs-29 > branch? Yes, if Alan is okay with making this change on the release branch. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 06:43:40 2023 Received: (at 64322) by debbugs.gnu.org; 1 Jul 2023 10:43:40 +0000 Received: from localhost ([127.0.0.1]:56718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFY4p-0000pQ-Vi for submit@debbugs.gnu.org; Sat, 01 Jul 2023 06:43:40 -0400 Received: from mx3.muc.de ([193.149.48.5]:54378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFY4n-0000p8-BH for 64322@debbugs.gnu.org; Sat, 01 Jul 2023 06:43:38 -0400 Received: (qmail 56980 invoked by uid 3782); 1 Jul 2023 12:43:31 +0200 Received: from acm.muc.de (pd953a7f0.dip0.t-ipconnect.de [217.83.167.240]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 01 Jul 2023 12:43:30 +0200 Received: (qmail 19448 invoked by uid 1000); 1 Jul 2023 10:43:30 -0000 Date: Sat, 1 Jul 2023 10:43:30 +0000 To: Eli Zaretskii Subject: Re: bug#64322: CC Mode 5.35.2 (C/*l); More incorrect type recognition Message-ID: References: <878rc46p9c.fsf.ref@yahoo.com> <878rc46p9c.fsf@yahoo.com> <87wmzk4h0u.fsf@yahoo.com> <834jmortsa.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <834jmortsa.fsf@gnu.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: 64322 Cc: Po Lu , acm@muc.de, 64322@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, Eli. On Sat, Jul 01, 2023 at 10:10:45 +0300, Eli Zaretskii wrote: > > From: Po Lu > > Cc: 64322@debbugs.gnu.org, Eli Zaretskii > > Date: Sat, 01 Jul 2023 08:22:41 +0800 > > Alan Mackenzie writes: > > > Yes. The problem was a confusion between C++ and C regarding type > > > definition. In C++, "class Foo" or "struct Foo" defines a type "Foo". > > > In C, in "struct Foo", there is no such type defined, "Foo" is merely a > > > struct tag. > > > This involves a one line fix in cc-langs.el, to remove items from the > > > lang const c-typeless-decl-kwds. Additionally, I've corrected an > > > unrelated typo in cc-fonts.el. > > > Would you please try out the attached patch in your real code > > > thoroughly, and either confirm the bug is fixed, or tell me what's still > > > wrong. Thanks! > > >> Thanks in advance. > > >> Emacs : GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu) > > >> of 2023-06-25 > > >> 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) > > Seems to work here, thanks. Eli, could we have this on the emacs-29 > > branch? > Yes, if Alan is okay with making this change on the release branch. My yesterday's patch amended C Mode and Objective-C Mode. I'm now less sure about the Objective-C Mode change than I was yesterday. So I propose changing only C Mode. Yes, I will do this on the release branch today. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 07:25:51 2023 Received: (at 64322-done) by debbugs.gnu.org; 1 Jul 2023 11:25:51 +0000 Received: from localhost ([127.0.0.1]:56823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFYjf-0004a3-2S for submit@debbugs.gnu.org; Sat, 01 Jul 2023 07:25:51 -0400 Received: from mx3.muc.de ([193.149.48.5]:55629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFYjc-0004Ze-QV for 64322-done@debbugs.gnu.org; Sat, 01 Jul 2023 07:25:50 -0400 Received: (qmail 5958 invoked by uid 3782); 1 Jul 2023 13:25:42 +0200 Received: from acm.muc.de (pd953a7f0.dip0.t-ipconnect.de [217.83.167.240]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 01 Jul 2023 13:25:42 +0200 Received: (qmail 29409 invoked by uid 1000); 1 Jul 2023 11:25:42 -0000 Date: Sat, 1 Jul 2023 11:25:42 +0000 To: Eli Zaretskii , Po Lu Subject: Re: bug#64322: CC Mode 5.35.2 (C/*l); More incorrect type recognition Message-ID: References: <878rc46p9c.fsf.ref@yahoo.com> <878rc46p9c.fsf@yahoo.com> <87wmzk4h0u.fsf@yahoo.com> <834jmortsa.fsf@gnu.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: 64322-done Cc: acm@muc.de, 64322-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 and Eli. On Sat, Jul 01, 2023 at 10:43:30 +0000, Alan Mackenzie wrote: > On Sat, Jul 01, 2023 at 10:10:45 +0300, Eli Zaretskii wrote: > > > From: Po Lu > > > Cc: 64322@debbugs.gnu.org, Eli Zaretskii > > > Date: Sat, 01 Jul 2023 08:22:41 +0800 > > > Alan Mackenzie writes: [ .... ] > > > > Would you please try out the attached patch in your real code > > > > thoroughly, and either confirm the bug is fixed, or tell me > > > > what's still wrong. Thanks! [ .... ] > > > Seems to work here, thanks. Eli, could we have this on the emacs-29 > > > branch? > > Yes, if Alan is okay with making this change on the release branch. > My yesterday's patch amended C Mode and Objective-C Mode. I'm now less > sure about the Objective-C Mode change than I was yesterday. So I > propose changing only C Mode. > Yes, I will do this on the release branch today. DONE. I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From unknown Wed Jun 25 05:43:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 30 Jul 2023 11:24:07 +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