GNU bug report logs - #15401
Incorrect indentation of c++ code

Previous Next

Packages: emacs, cc-mode;

Reported by: "P. Pieperhoff" <p.pieperhoff <at> fz-juelich.de>

Date: Tue, 17 Sep 2013 15:21:03 UTC

Severity: normal

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "P. Pieperhoff" <p.pieperhoff <at> fz-juelich.de>
To: 15401 <at> debbugs.gnu.org
Subject: bug#15401: Incorrect indentation of c++ code
Date: Tue, 17 Sep 2013 10:06:42 +0200
Dear all,

I encountered a problem with the automatic indentation of the following
c++ code:


const int Something = 10;

void dummy(int a)
{
  cout  << "xxxx " << a << " bbbbbbbbbbbb ";
}

MyClass::MyClass(const int n1, const int n2, const int n3, const int n4) :

  m_Var1(123, 1, Something),
  m_Var2(123, 1, Something),
  m_Var3(123, 1, Something),
  m_Var4(123, 1, Something),
  m_Var5(123, 1, Something),
  m_Var6(123, 1, Something),
  m_Var7(123, 1, Something),
  m_Var8(123, 1, Something),
  m_Var9(123, 1, Something),
  m_Var10(123, 1, Something),
  m_Var11(123, 1, Something),
  m_Var12(123, 1, Something),
  m_Var13(123, 1, Something),
  m_Var14(123, 1, Something),
  m_Var15(123, 1, Something),
               m_Var16(123, 1, Something),
               m_Var17(123, 1, Something),
               m_Var18(123, 1, Something),
               m_Var19(123, 1, Something)

{
  return;
}


But when I decomment the line with "cout << ..." in the function dummy,
the indendation of the member variable initializations is correct.


I used emacs version:
GNU Emacs 24.2.1 (x86_64-suse-linux-gnu, GTK+ Version 3.6.4)
 of 2013-02-21 on build16



Best regards,
Peter




------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Das Forschungszentrum oeffnet seine Tueren am Sonntag, 29. September, von 10:00 bis 17:00 Uhr: http://www.tagderneugier.de




This bug report was last modified 11 years and 106 days ago.

Previous Next


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