[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfon
From: |
Alan Mackenzie |
Subject: |
bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified. |
Date: |
Thu, 18 Aug 2016 10:21:33 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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).