unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Arash <pbqbqp@gmail.com>
Cc: 24258@debbugs.gnu.org
Subject: bug#24258: 25.1.50: In C++ `for' statement, second declaration is misfontified.
Date: Thu, 18 Aug 2016 10:21:33 +0000	[thread overview]
Message-ID: <20160818102133.GA3790@acm.fritz.box> (raw)
In-Reply-To: <20160818090415.GA3030@acm.fritz.box>

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).





  reply	other threads:[~2016-08-18 10:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-08-18 11:43   ` Arash
2016-08-18 12:04     ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160818102133.GA3790@acm.fritz.box \
    --to=acm@muc.de \
    --cc=24258@debbugs.gnu.org \
    --cc=pbqbqp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).