bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ indentation bug


From: Davin Pearson
Subject: C++ indentation bug
Date: Sat, 05 Feb 2005 18:43:22 +1300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707

This bug report will be sent to the Free Software Foundation,
not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (i386-*-nt5.1.2600)
of Wed Jun 14 2000 on buffy
configured using `configure NT'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

This is the second time I have
submitted this bug report.  This
time I have isolated the bug
to a single line containing //*

According to the fontification,
this starts a single line // comment,
but according to indent-region and
c-indent-command, this starts
a multi-line /* ... */ comment.

///
/// This file is a demonstration of a
/// bug in the commands
///
/// indent-region and c-indent-command
///
/// of Gnu Emacs. ///
/// I have deleted
/// as much as I could from this
/// file to mimimise the work needed
/// from an Emacs Lisp programmer to
/// find the bug. ///
/// The programming
/// language used is C++.
///
/// The bug is in the indentation
/// of the line following the #endif
///
/// The bug appears to be
/// cause by the slash-slash-star comment
/// line inside the blit
/// statement.
///

int main()
{
 for (;;) {

    blit(0,
         0,//*
         );

    switch (foo) {
    case KEY_P:
       {
#ifdef NDEBUG
          bar();
#endif /* NDEBUG */
            ///
            /// The indentation on the next line is wrong...
/// }
    }
 }
}

///
/// end of file
///

Recent input:
down down down down down up up up up up up up up S-left
S-left S-right SPC s l a s h - s l a h backspace s
g backspace h - s t a r down M-q home f2 f2 f2 C-g
down down down down down down down down down down end
left S-left down down down down down down down down
down down down down down down end up S-left S-right
S-left end down down down down down down down down
down down down down down S-left S-left home f2 f2 insert
C-g menu-bar help-menu report-emacs-bug

Recent messages:
TAB runs the command c-indent-command
Beginning of buffer [3 times]
Wrote d:/zallegro/2005/tests/t-17-indentation-bug.cc
Quit
Wrote d:/zallegro/2005/tests/t-17-indentation-bug.cc
(No files need saving) [2 times]
Quit
(No files need saving) [2 times]
<<< Press Return to bury the buffer list >>>

Quit

--
Davin Pearson                     http://www.geocities.com/davin_pearson



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 31/01/2005





reply via email to

[Prev in Thread] Current Thread [Next in Thread]