GNU bug report logs - #11386
C++11 support: C++ mode gets (temporarily) confused by edits to convert "> >" to ">>" in templates

Previous Next

Packages: emacs, cc-mode;

Reported by: James Dennett <jdennett <at> googlers.com>

Date: Mon, 30 Apr 2012 21:18:01 UTC

Severity: normal

Done: Rüdiger Sonderfeld <ruediger <at> c-plusplus.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: James Dennett <jdennett <at> googlers.com>
Subject: bug#11386: closed (Re: C++11 support: C++ mode gets (temporarily)
 confused by edits to convert "> >" to ">>" in templates)
Date: Tue, 18 Nov 2014 17:02:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11386: C++11 support: C++ mode gets (temporarily) confused by edits to convert "> >" to ">>" in templates

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 11386 <at> debbugs.gnu.org.

-- 
11386: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11386
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Rüdiger Sonderfeld <ruediger <at> c-plusplus.de>
To: 11386-done <at> debbugs.gnu.org
Subject: Re: C++11 support: C++ mode gets (temporarily) confused by edits to
 convert "> >" to ">>" in templates
Date: Tue, 18 Nov 2014 18:00:51 +0100
tags 11386 fixed

Should be fixed in 66bb9533fc77963c495de7f33ec6dc8e4d342a55


[Message part 3 (message/rfc822, inline)]
From: James Dennett <jdennett <at> googlers.com>
To: bug-gnu-emacs <at> gnu.org
Subject: C++11 support: C++ mode gets (temporarily) confused by edits to
	convert "> >" to ">>" in templates
Date: Mon, 30 Apr 2012 14:05:29 -0700
C++ mode gets confused if C++98 code is updated to omit the (now
unnecessary) space between the closing ">" angle brackets in template
argument lists.

To reproduce:

Start by typing the following (C++98) code:

int foo() {
  vector<vector<string> > temp;
}

So far, so good. Now go back and remove the extra space between the
closing angle brackets.  This will cause the closing } to not match
the opening { (according to emacs), so if you then add another
function below foo, you'll get something like:

int foo() {
  vector<vector<string>> temp;
  return 0;
}

      int bar() {
  }

where the indentation of everything after the function foo() is
broken.  Matching of the angle brackets is also broken.

The buffer can be restored to a good state by erasing and retyping the
inner "<" in the type.  Adding the extra space and removing it will
put the buffer back in a bad state.  Reading the code from file (with
or without the extra space) also leaves the buffer in a good state.



This bug report was last modified 10 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.