From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Somwhat subtle issues with raw string literals in C++ Date: Thu, 30 Jun 2016 13:07:52 +0000 Message-ID: <20160630130752.GC3082@acm.fritz.box> References: <20160629135725.GA5327@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467292220 14231 80.91.229.3 (30 Jun 2016 13:10:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 13:10:20 +0000 (UTC) Cc: Emacs developers To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 30 15:10:08 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bIbjI-0005BY-SP for ged-emacs-devel@m.gmane.org; Thu, 30 Jun 2016 15:10:05 +0200 Original-Received: from localhost ([::1]:49288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIbjI-00025s-4M for ged-emacs-devel@m.gmane.org; Thu, 30 Jun 2016 09:10:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIbh9-0000JF-5Y for emacs-devel@gnu.org; Thu, 30 Jun 2016 09:07:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIbh3-00031A-3x for emacs-devel@gnu.org; Thu, 30 Jun 2016 09:07:50 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:38148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIbh2-000315-Qv for emacs-devel@gnu.org; Thu, 30 Jun 2016 09:07:45 -0400 Original-Received: (qmail 25539 invoked by uid 3782); 30 Jun 2016 13:07:43 -0000 Original-Received: from acm.muc.de (p4FC460AB.dip0.t-ipconnect.de [79.196.96.171]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 30 Jun 2016 15:07:42 +0200 Original-Received: (qmail 5395 invoked by uid 1000); 30 Jun 2016 13:07:52 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204982 Archived-At: Hello, Philipp On Thu, Jun 30, 2016 at 11:35:27AM +0000, Philipp Stephani wrote: > Alan Mackenzie schrieb am Do., 30. Juni 2016 um 07:59 Uhr: > > Hello again, Philipp, > > On Tue, Jun 28, 2016 at 03:33:30PM +0000, Philipp Stephani wrote: > > > Hi, > > > there still seem to be some subtle issues with detection of raw string > > > literals. Unfortunately they are hard to reproduce. One example that > > fails > > > (for me) with a recent master build is: > > > cd /tmp > > > wget > > https://raw.githubusercontent.com/google/protobuf/ef7894e2dc6d287419e42a4fdc52cdfedd386d16/conformance/conformance_test.cc > > > /path/to/emacs -Q +686 conformance_test.cc > > > Around that line the fontification of the raw string literals is wrong > > > (quote characters are treated as string terminators), in other parts of > > the > > > file the fontification is correct. This typically happens with files that > > > contain many large raw string literals that contain quote characters. > > Again, thanks for the report. > > The problem was a mishandling of a cache, with the result that the raw > > string handling code mistakenly believed it was within a string when it > > wasn't, at a critical point in the file. > > Would you please try out the following patch and confirm that it fixes > > the problem, or let me know what's still not working properly. > At least in the case I tested, the patch appears to fix the problem. Thanks > a lot for the quick fix. Thank you again for the report. I've committed the patch to the Emacs master branch. -- Alan Mackenzie (Nuremberg, Germany).