bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62339: cc-mode fontifies variables incorrectly when const follows ty


From: Daniel Colascione
Subject: bug#62339: cc-mode fontifies variables incorrectly when const follows type
Date: Wed, 22 Mar 2023 18:17:05 -0400
User-agent: mu4e 1.9.21; emacs 30.0.50

Alan Mackenzie <acm@muc.de> writes:

> Hello, Eli and Daniel.
>
> Thanks for the bug report!
>
> On Wed, Mar 22, 2023 at 17:12:52 +0200, Eli Zaretskii wrote:
>> > From: Daniel Colascione <dancol@dancol.org>
>> > Cc: 62339@debbugs.gnu.org
>> > Date: Wed, 22 Mar 2023 10:19:55 -0400
>
>> > This problem reproduces for me on latest master with emacs -Q:
>
>> > ```
>> > TEST(Foo, Bar) {
>> >   NamedTemporaryDirectory const test_directory;
>> > }
>> > ```
>
>> Thanks.  What I see with Emacs built from master is that
>> test_directory in the above example gets font-lock-type-face in
>> c++-mode (but not in c-mode).  With Emacs built from emacs-29, both
>> modes produce correct fontification.
>
>> Alan, can you please look into this?
>
> I think this is caused by a faulty fix of bug #59267, where "typeless" C
> declarations like
>
>     const foo;
>
> , which are implicit int, were not being recognised.

Can we back out this fix in the meantime? These "typeless" declarations
can't be all that common.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]