unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified.
@ 2016-08-18  9:04 Alan Mackenzie
  2016-08-18 10:21 ` Alan Mackenzie
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Mackenzie @ 2016-08-18  9:04 UTC (permalink / raw)
  To: 24258; +Cc: Arash

Hello, Emacs.

In C++ Mode, in the following:

    for (int32 a = 0, int32 b = 0; ; ) {
    }

, the second "int32" is getting font-lock-variable-name-face and "b" is
left unfontified.  This is a bug.

This was reported by Arash <pbqbqp@gmail.com>.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified.
  2016-08-18  9:04 bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified Alan Mackenzie
@ 2016-08-18 10:21 ` Alan Mackenzie
  2016-08-18 11:43   ` Arash
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Mackenzie @ 2016-08-18 10:21 UTC (permalink / raw)
  To: Arash; +Cc: 24258

Hello, Arash.

On Thu, Aug 18, 2016 at 09:04:15AM +0000, Alan Mackenzie wrote:
> In C++ Mode, in the following:

>     for (int32 a = 0, int32 b = 0; ; ) {
>     }

> , the second "int32" is getting font-lock-variable-name-face and "b" is
> left unfontified.  This is a bug.

I'm not convinced that the above is correct syntax; the following, I
think, would be correct:

    for (int32 a = 0, b = 0 ; ... ; ...) { ... }

, but I don't think a second type (before the "b") is allowed.  I've
even tried it out with a compiler.

If this is the case, then CC Mode is behaving reasonably in fontifying
the second "int32" as a variable - it draws the programmer's attention
to something being wrong.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified.
  2016-08-18 10:21 ` Alan Mackenzie
@ 2016-08-18 11:43   ` Arash
  2016-08-18 12:04     ` Alan Mackenzie
  0 siblings, 1 reply; 4+ messages in thread
From: Arash @ 2016-08-18 11:43 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 24258

Oops lol, Sorry!
I was thinking of where else could something like
bug#24246 happen, I stopped thinking too early..





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified.
  2016-08-18 11:43   ` Arash
@ 2016-08-18 12:04     ` Alan Mackenzie
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2016-08-18 12:04 UTC (permalink / raw)
  To: Arash, 24258-done

tags 24258 notabug
quit

Hello, Arash.

On Thu, Aug 18, 2016 at 04:13:36PM +0430, Arash wrote:
> Oops lol, Sorry!

No problem!

> I was thinking of where else could something like
> bug#24246 happen, I stopped thinking too early..

Thanks!  That's always a good thing to do with a bug.

And I learned something about for statements.

I'm closing this now as it's "not a bug".

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-18 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18  9:04 bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified Alan Mackenzie
2016-08-18 10:21 ` Alan Mackenzie
2016-08-18 11:43   ` Arash
2016-08-18 12:04     ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).