From unknown Mon Jun 23 11:25:57 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#59267 <59267@debbugs.gnu.org> To: bug#59267 <59267@debbugs.gnu.org> Subject: Status: CC Mode 5.35.2 (C/*l); implicit int declaration recognized as type Reply-To: bug#59267 <59267@debbugs.gnu.org> Date: Mon, 23 Jun 2025 18:25:57 +0000 retitle 59267 CC Mode 5.35.2 (C/*l); implicit int declaration recognized as= type reassign 59267 cc-mode submitter 59267 Po Lu severity 59267 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 14 18:15:35 2022 Received: (at submit) by debbugs.gnu.org; 14 Nov 2022 23:15:35 +0000 Received: from localhost ([127.0.0.1]:51523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouifu-0000F0-VS for submit@debbugs.gnu.org; Mon, 14 Nov 2022 18:15:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:60394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouifl-0000Df-SD for submit@debbugs.gnu.org; Mon, 14 Nov 2022 18:15:26 -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 1ouifc-0005tG-ME for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 18:15:19 -0500 Received: from sonic315-20.consmr.mail.ne1.yahoo.com ([66.163.190.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ouYFJ-0005YV-TE for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 07:07:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668427641; bh=1aR6JULLziZMKhsdaIbxFmH9mo7JzYfVICNO9d1i2PU=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=EQMXcEwB5OzwcaQ3RMf1XK9V3hG+lbEjqlFysZSJf3oi7/PvTKJYc61+SndJMXpEKS9h3SfAuM7IujbIexyrYDoplw4MzgNe+leEdSy0SW17ar2zJ2ImQB9iNXMuyp0dQ5PJLiJz0gt4bzhCz0FxKVyIXUp4vhzRvW+8Nbz0ijZFjcPF2NZ/d+OEfsa9566RizpYU/nPaPbusl+TYXwyjsb5TMj/xSEu1pgB3q2pBZvUtZMro7CkLBjVJjnaKdkDavfLIOg3QBB4U7ZyQYNm7RI3/DsCI/sPHmZjSrf7Gkss9guBLBTURG2cyFw44s0lmmGy08bsZiZnmXUbN64KWg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668427641; bh=Dt04Y8Op2jT8w/KVjT8ft10Jcr5pj++HLcPYLB1s63E=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=W9ISB33XicBA8TS1fL6hhNvPmtzoSz43BPkhj4hpn0vdqH/wvwraFYfUokLSnNmZnI0/0iwt18RtUFWm5mevw8mQw/UeD3bYvm+Lz1kIZXUOB3aXMLECoOxKA7AjUMGlCP/tY9XJ2Opi1fPpAGR2ObM5wL4YVhvencvA3GZkDBWFuxDDbv6oYkp/yipgZZcuflMbD6RWHlMxXiP57CURTRgYOIVX5GF7boDhm8ZRqe+Yy7xIHNvOay7lBDUqNZURPsndf2BAAw18qDYhMQUzvOIhhks9i4Y6Z2nWpK30ostccp8NmX4tKqOX/b0l4MXKSEwgavsGDrqda3/RIshr5Q== X-YMail-OSG: itiOgXAVM1mxf9wl.WA8fLhnvjOsjb_az7EDdookvgj_w9Xh31RAzca0UbAZBef 2LNM5bIX20noGqSjBhYFH2WGNE80.mVSk4y_xLxo4DAMEskY6JpBMYPmvIvl45GQeOnqV_uQ5M_X XHeP3hwmzViAWjUwDpZT28qPsr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8Udhxp9uMDJZaNuSMpqnAmn5PkIfxzaYg- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Mon, 14 Nov 2022 12:07:21 +0000 Received: by hermes--production-sg3-6c8895b545-26lc9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b4a56f283c11d9137ce996bec9c1109b; Mon, 14 Nov 2022 12:07:16 +0000 (UTC) From: Po Lu To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.35.2 (C/*l); implicit int declaration recognized as type X-Debbugs-Package: cc-mode Date: Mon, 14 Nov 2022 20:07:09 +0800 Message-ID: <87a64tivte.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <87a64tivte.fsf.ref@yahoo.com> X-Mailer: WebService/1.1.20826 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 4594 Received-SPF: pass client-ip=66.163.190.146; envelope-from=luangruo@yahoo.com; helo=sonic315-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, 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 Place the following code in a C-mode buffer: { register rtcnt,ipU; ipU +=3D rtcnt; } Notice that `rtcnt' is recognized as a type, but is actually a variable of type int put in a register. Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu) of 2022-11-12 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 Wed Nov 16 16:50:44 2022 Received: (at 59267) by debbugs.gnu.org; 16 Nov 2022 21:50:44 +0000 Received: from localhost ([127.0.0.1]:58389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovQIt-00035f-TK for submit@debbugs.gnu.org; Wed, 16 Nov 2022 16:50:44 -0500 Received: from mx3.muc.de ([193.149.48.5]:56806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovQIp-00035O-Bf for 59267@debbugs.gnu.org; Wed, 16 Nov 2022 16:50:43 -0500 Received: (qmail 25546 invoked by uid 3782); 16 Nov 2022 22:50:32 +0100 Received: from acm.muc.de (p4fe15930.dip0.t-ipconnect.de [79.225.89.48]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 16 Nov 2022 22:50:32 +0100 Received: (qmail 16370 invoked by uid 1000); 16 Nov 2022 21:50:31 -0000 Date: Wed, 16 Nov 2022 21:50:31 +0000 To: Po Lu Subject: Re: bug#59267: CC Mode 5.35.2 (C/*l); implicit int declaration recognized as type Message-ID: References: <87a64tivte.fsf.ref@yahoo.com> <87a64tivte.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="d+nanoBhyzv/dZPT" Content-Disposition: inline In-Reply-To: <87a64tivte.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: 59267 Cc: 59267@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 (-) --d+nanoBhyzv/dZPT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Po. Thanks, once again, for a high quality bug report! On Mon, Nov 14, 2022 at 20:07:09 +0800, Po Lu via CC-Mode-help wrote: > Package: cc-mode > Place the following code in a C-mode buffer: > { > register rtcnt,ipU; > ipU += rtcnt; > } > Notice that `rtcnt' is recognized as a type, but is actually a variable > of type int put in a register. Yes. I think this would be very rare in modern code, depending on an implicit type, int, following a specifier such as "register". At least, I hope so! This was actually quite tricky to fix. As well as "register", the code should now handle the implicit int following (all of the?) other specifiers, too. Would you please try out the attached patch on your real code, and let me know how well it works. Thanks! > Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu) > of 2022-11-12 > 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). --d+nanoBhyzv/dZPT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="diff.20221116b.diff" diff -r 7facafbca2e2 cc-engine.el --- a/cc-engine.el Mon Nov 14 09:31:02 2022 +0000 +++ b/cc-engine.el Wed Nov 16 21:31:29 2022 +0000 @@ -9058,7 +9058,8 @@ ;; o - 'found if it's a type that matches one in `c-found-types'; ;; o - 'maybe if it's an identifier that might be a type; ;; o - 'decltype if it's a decltype(variable) declaration; - or - ;; o - 'no-id if "auto" precluded parsing a type identifier. + ;; o - 'no-id if "auto" precluded parsing a type identifier (C++) + ;; or the type int was implicit (C). ;; o - nil if it can't be a type (the point isn't moved then). ;; ;; The point is assumed to be at the beginning of a token. @@ -9082,10 +9083,11 @@ ;; Skip leading type modifiers. If any are found we know it's a ;; prefix of a type. - (when c-opt-type-modifier-prefix-key ; e.g. "const" "volatile", but NOT "typedef" - (while (looking-at c-opt-type-modifier-prefix-key) - (when (looking-at c-no-type-key) - (setq res 'no-id)) + (when c-maybe-typeless-specifier-re + (while (looking-at c-maybe-typeless-specifier-re) + (save-match-data + (when (looking-at c-no-type-key) + (setq res 'no-id))) (goto-char (match-end 1)) (c-forward-syntactic-ws) (or (eq res 'no-id) @@ -9150,6 +9152,9 @@ (not (eq res 'no-id)) (progn (setq pos nil) + (while (and c-opt-cpp-prefix + (looking-at c-noise-macro-with-parens-name-re)) + (c-forward-noise-clause)) (if (looking-at c-identifier-start) (save-excursion (setq id-start (point) @@ -9209,6 +9214,18 @@ (goto-char (match-end 1)) (c-forward-syntactic-ws))))) + ((and (eq name-res t) + (eq res 'prefix) + (c-major-mode-is 'c-mode) + (save-excursion + (goto-char id-end) + (and (not (looking-at c-symbol-start)) + (not (looking-at c-type-decl-prefix-key))))) + ;; A C specifier followed by an implicit int, e.g. + ;; "register count;" + (goto-char id-start) + (setq res 'no-id)) + (name-res (cond ((eq name-res t) ;; A normal identifier. @@ -9246,7 +9263,11 @@ (t ;; Otherwise it's an operator identifier, which is not a type. (goto-char start) - (setq res nil))))) + (setq res nil)))) + + ((eq res 'prefix) + ;; Deal with "extern "C" foo_t my_foo;" + (setq res nil))) (when (not (memq res '(nil no-id))) ;; Skip trailing type modifiers. If any are found we know it's @@ -10034,9 +10055,11 @@ got-suffix-after-parens id-start paren-depth 0)) - (if (setq at-type (if (eq backup-at-type 'prefix) - t - backup-at-type)) + (if (not (memq + (setq at-type (if (eq backup-at-type 'prefix) + t + backup-at-type)) + '(nil no-id))) (setq type-start backup-type-start id-start backup-id-start) (setq type-start start-pos @@ -11239,7 +11262,8 @@ ;; Record the type's coordinates in `c-record-type-identifiers' for ;; later fontification. - (when (and c-record-type-identifiers at-type ;; (not (eq at-type t)) + (when (and c-record-type-identifiers + (not (memq at-type '(nil no-id))) ;; There seems no reason to exclude a token from ;; fontification just because it's "a known type that can't ;; be a name or other expression". 2013-09-18. diff -r 7facafbca2e2 cc-langs.el --- a/cc-langs.el Mon Nov 14 09:31:02 2022 +0000 +++ b/cc-langs.el Wed Nov 16 21:31:29 2022 +0000 @@ -3873,6 +3873,14 @@ t) "\\>"))) +(c-lang-defconst c-maybe-typeless-specifier-re + "Regexp matching keywords which might, but needn't, declare variables with +no explicit type given, or nil in languages without such specifiers." + t (c-lang-const c-opt-type-modifier-prefix-key) + c (c-lang-const c-type-decl-prefix-keywords-key)) +(c-lang-defvar c-maybe-typeless-specifier-re + (c-lang-const c-maybe-typeless-specifier-re)) + (c-lang-defconst c-type-decl-prefix-key "Regexp matching any declarator operator that might precede the identifier in a declaration, e.g. the \"*\" in \"char *argv\". This --d+nanoBhyzv/dZPT-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 19:28:23 2022 Received: (at 59267) by debbugs.gnu.org; 17 Nov 2022 00:28:23 +0000 Received: from localhost ([127.0.0.1]:58517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovSlT-0000jf-EC for submit@debbugs.gnu.org; Wed, 16 Nov 2022 19:28:23 -0500 Received: from sonic317-33.consmr.mail.ne1.yahoo.com ([66.163.184.44]:42533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovSlO-0000jC-W6 for 59267@debbugs.gnu.org; Wed, 16 Nov 2022 19:28:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668644892; bh=ettGZY3RiuTVZD6CoO5Dsp8IeCcez5QUpAUlIjuZ3vo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=kuU/M8CXq/RpotevJxapPt0gVzxhvCnr2ygaNkDLJOr91kymV7R2M7P/Bt5cIscRaXkmuFDtP9/ZN3LM8xElgmJ1Vn7rwNwoKylX9Ag8fv0hlgiYLIJNloltyEJ0gN6tfncdiaMObemn+4h6uQ1s9sVF4HnFsyG0+OFPc60jpxER+GYc3QExPF1EYLZI6E7ioTwSJJ6/u7DTcwUL5WQ168VSo5/2IVv7Ct6mZRqNuEObTOEgl1CxyZmq90kP1tY/6VuEjStOi8aEfoNOI4sQUNXXzeQSIj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UnaXLeoOkjVrW UeDanMwaV1PP23BAf8vzJPsKzHooiFcPLKRvQuZppxzVUaK5mA2goDS5McGL3Be7OS3ACnjvesDu 7tTC0eMcUrDQTJWoZezbYFQv366zbU23MR.rNPDtz3M3XIUU1W0GOiUhSkjFqrf5TRzx5I4CUPjO LOhWwZsnM28KQ9h3ParMertHp6SckinEWhQGSns898EWjT.WSA_NQ6RDAHvC1fmWusmPAo4Q2mHB UFDotmqWQk_VaxQeUZeGMCKBwZYhdS_Y1NqtJC2hs0Bt_tpyasmcOpxM6uq5B5m0SG5TxMZkp0yR pWpUVx9wUCkDkxhvDCaoj84MgX8i4_gqJEcLXIARFnv8FpvHtSy_Spoil_NlDZulMrW2ukgkh3gY 0s7UvQidLkZvRHmL.sGasqivXQmY_ZY_bNkgtXyv3IQSeqPPR5qBxGst52zQoytacfOsbcxFl9os iJZd1y0pQliJ73Iy4rqhsmmaDI7D6u0dW81gXRVo_Cba6QmFvPO0DpJRRgPgc0VyNgZ2bx57AjiG nSOJ5r.ixQuDhZ_LqUowX9l447MMu2y_bY0kjsrN936MUQ590BYvVN3C560luDWTt8fwPJvnEkqL xVMa8ymhYk6TFT57cGzzBxiKJglP8pCKDESLhAgZv3mEPZoQHSow9JpIyOPbnOKC.w.Y1bq0JGWD 9zgNKpu2yy4BistovmBWlIcBBGh2D232gek56KEo1gs9p.y8nedzO4gM8fXFWRnZv8fWr X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Thu, 17 Nov 2022 00:28:12 +0000 Received: by hermes--production-sg3-6c8895b545-26lc9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ef8f9d2ac6570eb96cbe4fa24edab75b; Thu, 17 Nov 2022 00:28:08 +0000 (UTC) From: Po Lu To: Alan Mackenzie Subject: Re: bug#59267: CC Mode 5.35.2 (C/*l); implicit int declaration recognized as type In-Reply-To: (Alan Mackenzie's message of "Wed, 16 Nov 2022 21:50:31 +0000") References: <87a64tivte.fsf.ref@yahoo.com> <87a64tivte.fsf@yahoo.com> Date: Thu, 17 Nov 2022 08:28:02 +0800 Message-ID: <87v8neh1bh.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: 498 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59267 Cc: 59267@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: > Yes. I think this would be very rare in modern code, depending on an > implicit type, int, following a specifier such as "register". At least, > I hope so! > > This was actually quite tricky to fix. As well as "register", the code > should now handle the implicit int following (all of the?) other > specifiers, too. > > Would you please try out the attached patch on your real code, and let > me know how well it works. Thanks! This works fine, thanks! From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 05:49:36 2022 Received: (at 59267-done) by debbugs.gnu.org; 17 Nov 2022 10:49:36 +0000 Received: from localhost ([127.0.0.1]:59278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovcSe-0004N6-Jq for submit@debbugs.gnu.org; Thu, 17 Nov 2022 05:49:36 -0500 Received: from mx3.muc.de ([193.149.48.5]:24374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovcSc-0004Mq-0l for 59267-done@debbugs.gnu.org; Thu, 17 Nov 2022 05:49:35 -0500 Received: (qmail 89854 invoked by uid 3782); 17 Nov 2022 11:49:26 +0100 Received: from acm.muc.de (p4fe159c3.dip0.t-ipconnect.de [79.225.89.195]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 17 Nov 2022 11:49:26 +0100 Received: (qmail 6987 invoked by uid 1000); 17 Nov 2022 10:49:25 -0000 Date: Thu, 17 Nov 2022 10:49:25 +0000 To: Po Lu Subject: Re: bug#59267: CC Mode 5.35.2 (C/*l); implicit int declaration recognized as type Message-ID: References: <87a64tivte.fsf.ref@yahoo.com> <87a64tivte.fsf@yahoo.com> <87v8neh1bh.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v8neh1bh.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: 59267-done Cc: 59267-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 Thu, Nov 17, 2022 at 08:28:02 +0800, Po Lu wrote: > Alan Mackenzie writes: > > Yes. I think this would be very rare in modern code, depending on an > > implicit type, int, following a specifier such as "register". At least, > > I hope so! > > This was actually quite tricky to fix. As well as "register", the code > > should now handle the implicit int following (all of the?) other > > specifiers, too. > > Would you please try out the attached patch on your real code, and let > > me know how well it works. Thanks! > This works fine, thanks! OK, that's good, thanks! I've committed the patch, and I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 11:25:57 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, 15 Dec 2022 12:24:12 +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