GNU bug report logs -
#24431
25.1.50; Wrong indentation in C++ mode when calling constructors with braces
Previous Next
Reported by: Matthias Meulien <orontee <at> gmail.com>
Date: Tue, 13 Sep 2016 21:12:02 UTC
Severity: normal
Found in version 25.1.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello, Matthias
In article <mailman.2380.1473801128.22741.bug-gnu-emacs <at> gnu.org> you wrote:
> Just type the following lines in a buffer with c++-mode enabled:
> struct line_t;
> struct point_t;
> void set_line(line_t);
> set_line(line_t(point_t(0.4, 0.2),
> point_t(0.2, 0.5)));
> set_line(line_t{point_t{0.4, 0.2},
> point_t{0.2, 0.5}}); // wrong identation
What, exactly, is wrong about that indentation? What would you like to
see there, and why?
When I do C-c C-s on that last line, I get:
Syntactic analysis: ((arglist-cont-nonempty 130 138) (defun-block-intro 130) (statement-cont 130))
, which seems to be incorrect, since neither of the anchor points in the
last two of the three elements point at locations within the internal C++
constructs. Amongst other things.
> In GNU Emacs 25.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.9)
> of 2016-08-27 built on carbon
> Repository revision: 1c7166a3ba399efbefc65feb8a6a41ef0dfa33a4
> Windowing system distributor 'The X.Org Foundation', version
> 11.0.11804000
> System Description: Arch Linux
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 8 years and 115 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.