GNU bug report logs -
#59267
CC Mode 5.35.2 (C/*l); implicit int declaration recognized as type
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Mon, 14 Nov 2022 23:16:02 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, 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).
[diff.20221116b.diff (text/plain, attachment)]
This bug report was last modified 2 years and 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.