|
From: | Jared Finder |
Subject: | c++ font-lock bug |
Date: | Tue, 25 Jul 2006 15:13:24 -0700 |
c++-mode does not correctly fontify variable declarations in for loops (or if's) the following code:
int main( void ) {
for( uint8 i = 0; i != 100; ++i )
{
for( uint8* j = &i; j !=
&i + 1; ++j )
{
//
^^^^^^^^
// This
should be fontified as a variable declaration!
printf(
"BLAH!!!\n" );
}
}
}
In theory, without knowledge if uint8 is a type or a variable, you can not
correctly fontify the
previous code. But any code that overloads
operator* and operator= such that the previous code
makes sense as a
statement deserves much worse pain than minor incorrect fontification.
;)
-- MJF
In GNU Emacs 22.0.50.1
(i386-mingw-nt5.1.2600) of 2006-06-04
on TPAD X server distributor `Microsoft Corp.', version
5.1.2600 configured
using `configure --with-gcc (3.4) --cflags -O2 -march=i686
-mtune=i686
-ffast-math -IC:/gnuwin32/include_emacs -IC:/gnuwin32/lib
-IC:/gnuwin32/src --ldflags -s '
Important settings: value
of $LC_ALL: nil value of $LC_COLLATE: nil value of
$LC_CTYPE: nil
value of $LC_MESSAGES: nil value of
$LC_MONETARY: nil value of $LC_NUMERIC: nil value
of
$LC_TIME: nil value of $LANG: ENU
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: C++/lw Minor modes in effect:
hide-ifdef-hiding:
t global-balanced-mode: t balanced-mode: t
hrule-mode: t cua-mode: t
c-subword-mode: t
global-reveal-mode: t reveal-mode: t
global-hi-lock-mode: t hi-lock-mode:
t recentf-mode:
t show-paren-mode: t hide-ifdef-mode: t
semantic-idle-summary-mode: t
semantic-idle-scheduler-mode:
t global-c-subword-mode: t shell-dirtrack-mode: t
semantic-show-parser-state-mode: t encoded-kbd-mode:
t tooltip-mode: t mouse-wheel-mode: t
menu-bar-mode: t file-name-shadow-mode: t
global-font-lock-mode: t font-lock-mode: t
blink-cursor-mode: t unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
column-number-mode: t line-number-mode: t
transient-mark-mode: t
abbrev-mode: t Recent input: <up>
<M-end> <M-left> <M-right> <M-right>
<M-right> <M-right>
<M-right> <C-right>
<M-left> <M-backspace> <backspace> <backspace> *
SPC M-l <C-right> <M-right>
<M-delete> <down>
<down> <down> <left> <M-left> <M-left>
<M-right> <M-right> <M-right> <left>
<left>
<left> <left> <left> <left> <left>
<left> <left> <left> <M-delete> u i n t 8 *
<M-right>
<M-right> <right> <right> SPC r u n .
b y t e s ; SPC b y t e I t SPC ! = SPC <help-echo>
<help-echo>
<help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo>
<help-echo>
<help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo>
<help-echo>
<help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo>
<help-echo>
<menu-bar> <help-menu> <report-emacs-bug> Recent messages:
Show the Emacs license (GPL)
How to get latest versions of Emacs Lisp
packages distributed separately for use in Emacs Display
version number,
copyright info, and basic help Find packages and features by keyword
Full
documentation of Emacs features Send e-mail to Emacs maintainers Loading
emacsbug...done mouse-1:
major mode, mouse-2: major mode help, mouse-3:
toggle minor modes funcall: End of buffer
[Prev in Thread] | Current Thread | [Next in Thread] |