[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64204: C/C++ local variables not syntax highlighted if they start wi
From: |
Po Lu |
Subject: |
bug#64204: C/C++ local variables not syntax highlighted if they start with $ |
Date: |
Wed, 21 Jun 2023 19:51:50 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Joseph Garvin <k04jg02@gmail.com> writes:
> Start emacs with `emacs -Q`, press C-x C-f and type in a filename that
> ends in .cpp like "foo.cpp". Then type in:
>
> int main()
> {
> int a = 0;
> int b = 0;
> int $ = 0;
> int d$ = 0;
> int $e = 0;
> }
>
> Yes it compiles! GCC, Clang, and MSVC all have a non-standard
> extension that allows $ signs to appear in C/C++ variable and type
> names: https://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html
>
> Then a,b,d$ will be highlighted correctly as local vars, but not $ or
> $e. The highlighting doesn't appear to work whenever $ is the first or
> only character. Since emacs is accepting of the $ sign anywhere else in
> the variable name, I suspect supporting $ was intended, even though it's
> non-standard. Even if not intended, it's a popular syntax
> extension supported by the major current compilers and whose history
> goes back to the DEC compiler, so support would be nice.
This is a bug indeed. Alan, would you please look into this?
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Joseph Garvin, 2023/06/21
- bug#64204: C/C++ local variables not syntax highlighted if they start with $,
Po Lu <=
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Alan Mackenzie, 2023/06/21
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Alan Mackenzie, 2023/06/21
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Eli Zaretskii, 2023/06/22
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Po Lu, 2023/06/22
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Eli Zaretskii, 2023/06/22
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Po Lu, 2023/06/22
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Eli Zaretskii, 2023/06/22
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Po Lu, 2023/06/22
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Eli Zaretskii, 2023/06/22
- bug#64204: C/C++ local variables not syntax highlighted if they start with $, Po Lu, 2023/06/22