GNU bug report logs - #42581
Wrong C++ indentation when using class MY_DLL_EXPORT_MACRO foo

Previous Next

Package: emacs;

Reported by: Stephane A <a.stephane.fsw <at> gmail.com>

Date: Tue, 28 Jul 2020 14:04:02 UTC

Severity: normal

Tags: moreinfo

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephane A <a.stephane.fsw <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Wrong C++ indentation when using class MY_DLL_EXPORT_MACRO foo
Date: Tue, 28 Jul 2020 13:34:43 +0200
[Message part 1 (text/plain, inline)]
Hello,

There is a C++ indentation problem when using:
class MY_EXPORT_DLL_MACRO foo {
// with a
public:
foo(); // This line is not indented
// section.
};

The problem is not reproduced if, either:

   - the "MY_DLL_EXPORT_MACRO" is removed; or
   - the "public:" section is removed


Please find enclosed a sample C++ file containing the indentation problem
using different C++ styles (stroustrup, linux and gnu) and the following
emacs information.

Best regards,

Stéphane
[Message part 2 (text/html, inline)]
[emacs-cxx-indentation.txt (text/plain, attachment)]
[emacs-cxx-indentation.cpp (text/x-c++src, attachment)]

This bug report was last modified 3 years and 122 days ago.

Previous Next


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