Subject: bug#33163: closed (Re: bug#33163: Adding a " in c++-mode fills the whole file with red)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 30 Oct 2018 12:02:02 +0000

Your bug report

#33163: Adding a " in c++-mode fills the whole file with red

which was filed against the emacs,cc-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
33163: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33163
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#33163: Adding a " in c++-mode fills the whole file with red
From: Alan Mackenzie <[email-masked]>
To: Konstantin Kharlamov <[email-masked]>
Cc: [email-masked]
Date: Tue, 30 Oct 2018 12:01:32 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, Konstantin

On Mon, Oct 29, 2018 at 21:46:50 +0300, Konstantin Kharlamov wrote:
> Thank you, so, I've used the patch today for working with a code, and 
> everything seemed to be well :)

> Tested-by: Konstantin Kharlamov <[email-masked]>

Thanks for the testing.  I've committed the patch to all the usual
places, and I'm closing the bug.

-- 
Alan Mackenzie (Nuremberg, Germany).

Subject: Adding a " in c++-mode fills the whole file with red
From: Konstantin Kharlamov <[email-masked]>
To: [email-masked]
Date: Fri, 26 Oct 2018 17:05:04 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

This long-standing problem appears occasionally, and only disappears if you kill the buffer completely, then reopen the file. I never got to report it because I never could find steps to reproduce it… until now :) Nvm the non-sense code, I reduced testcase as far as I managed.

# Steps to reproduce:

1. Save the following text in `test.cpp`
     int main() {
             puts(It's");
         auto foo = []()-> void {  };
             puts("It's");
     }
2. Open `emacs -Q ./test.cpp`
3. Now, the text lacks a quote in the first `puts(It's");`. Add it so it looks like `puts("It's");`. Essentially, if you'd compile it with g++, it lacks any syntax error besides `puts` being undeclared.

# Expected

The line with `auto foo…` is not red.

# Actual

The line with `auto foo…` (in particular) becomes red.

# Additional information

Emacs version GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-10-01, build with -flto.