GNU bug report logs -
#5388
23.1; syntactic analysis incorrect
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5388 in the body.
You can then email your comments to 5388 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5388
; Package
emacs
.
(Fri, 15 Jan 2010 14:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Odekirk, Shawn" <Shawn.Odekirk <at> intelligrated.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 15 Jan 2010 14:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
From: <shawn.odekirk <at> fkilogistex.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; syntactic analysis incorrect
--text follows this line--
A switch statement with two case labels, at least one of which is a
character constant, causes the syntactic analysis of the first statement
in the case block to be evaluated as statement-cont instead of
statement-case-intro.
I believe the line 'x = 1;' should be evaluated as statement-case-into,
but it is being evaluated as statement-cont.
switch (x)
{
case 'a':
case 'b':
x = 1;
y = 2;
break;
}
In GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.5)
of 2009-07-31 on bitzer.hoetzel.info
Windowing system distributor `The X.Org Foundation', version
11.0.10703901
configured using `configure '--prefix=/usr' '--sysconfdir=/etc'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--mandir=/usr/share/man'
'--without-sound' '-with-x-toolkit=gtk' 'CFLAGS=-march=x86-64
-mtune=generic -O2 -pipe''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: C
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: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: C/l
Minor modes in effect:
tooltip-mode: t
tool-bar-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
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
C-x k <return> <up> <up> <up> <up> <down> <down> <down>
<down> <down> <down> <down> s w i t c h SPC ( x ) <escape>
x c - m o d e <return> <down> <down> <down> <return>
{ <return> } <end> <up> <return> c a s e SPC ' a '
: <return> c a s e SPC ' b ' : <return> x SPC = SPC
1 ; <return> y SPC = SPC 3 <backspace> 2 ; <return>
b r e a k ; <down> <tab> <up> <tab> <escape> x s e
t - v a r <tab> <return> c - e <tab> c <tab> <return>
y <backspace> t <return> <tab> <up> <tab> <up> <tab>
<up> <tab> <down> <tab> <down> <tab> <up> <tab> <up>
<tab> <up> <up> <up> <up> <C-home> C-k C-k C-k C-k
C-k C-k C-k <tab> <down> <tab> <down> <tab> <down>
<tab> <down> <tab> <down> <tab> <down> <tab> <down>
<tab> <down> <down> <down> <return> <escape> x r e
p o r <tab> <return>
Recent messages:
syntax: ((statement-cont 221)), indent: 4
syntax: ((case-label 205)), indent: 2
Mark set
syntax: ((topmost-intro 1)), indent: 0
syntax: ((substatement-open 1)), indent: 2
syntax: ((case-label 14)), indent: 2 [2 times]
syntax: ((statement-cont 30)), indent: 4
syntax: ((statement 30)), indent: 2
syntax: ((statement 53)), indent: 2
syntax: ((block-close 14)), indent: 2
________________________________
Shawn Odekirk
Senior Software Engineer
Intelligrated
4612 Navistar Drive
Frederick, MD 21703
Email: shawn.odekirk <mailto:shawn.odekirk <at> intelligrated.com>
@intelligrated.com
Web: www.intelligrated.com <http://www.intelligrated.com/>
Phone: 240.629.1540
Cell: 240.647.8457
Fax: 240.629.1460
________________________________
CONFIDENTIALITY NOTICE
This e-mail transmission, and any documents, files, or previous e-mail
messages attached to it, may contain confidential information, trade
secret information, or information that is legally privileged. If you
are not the intended recipient, or a person responsible for delivering
it to the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of any of the information
contained in or attached to this message is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by reply e-mail, and destroy the original transmission and its'
attachments.
This E-mail is the property of Intelligrated.
[Message part 2 (text/html, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5388
; Package
emacs
.
(Sat, 16 Jan 2010 21:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 5388 <at> debbugs.gnu.org (full text, mbox):
> A switch statement with two case labels, at least one of which is a
> character constant, causes the syntactic analysis of the first
> statement in the case block to be evaluated as statement-cont instead
> of statement-case-intro.
>
> I believe the line 'x = 1;' should be evaluated as
> statement-case-into, but it is being evaluated as statement-cont.
>
> switch (x)
> {
> case 'a':
> case 'b':
> x = 1;
> y = 2;
> break;
> }
Thanks for the bug report, but it does not contain enough information
for us to do anything. I assume you are referring to C mode. However,
if I paste your snippet into a fresh foo.c and call M-x
c-syntactic-information-on-region, I get the following:
switch (x) /* ((topmost-intro 1)) */
{ /* ((substatement-open 1)) */
case 'a': /* ((case-label 42)) */
case 'b': /* ((case-label 42)) */
x = 1; /* ((statement-case-intro 117)) */
y = 2; /* ((statement 157)) */
break; /* ((statement 203)) */
} /* ((block-close 42)) */
As you can see, the snippet is correctly parsed.
Please provide an exact, step-by-step recipe for reproducing this bug,
starting with `emacs -Q'.
bug reassigned from package 'emacs' to 'emacs,cc-mode'.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 19 Jan 2010 19:24:02 GMT)
Full text and
rfc822 format available.
Added tag(s) moreinfo.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 21 Jan 2010 00:38:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Mon, 11 Jul 2011 21:27:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Odekirk, Shawn" <Shawn.Odekirk <at> intelligrated.com>
:
bug acknowledged by developer.
(Mon, 11 Jul 2011 21:27:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 5388-done <at> debbugs.gnu.org (full text, mbox):
This bug is being closed because it could not be reproduced and there
was no response to a request for more information.
If you reply with the requested information it can be reopened if needed.
You can view the whole report at http://debbugs.gnu.org/BUGNUMBER
Chong Yidong wrote:
> Thanks for the bug report, but it does not contain enough information
> for us to do anything. I assume you are referring to C mode. However,
> if I paste your snippet into a fresh foo.c and call M-x
> c-syntactic-information-on-region, I get the following:
>
> switch (x) /* ((topmost-intro 1)) */
> { /* ((substatement-open 1)) */
> case 'a': /* ((case-label 42)) */
> case 'b': /* ((case-label 42)) */
> x = 1; /* ((statement-case-intro 117)) */
> y = 2; /* ((statement 157)) */
> break; /* ((statement 203)) */
> } /* ((block-close 42)) */
>
> As you can see, the snippet is correctly parsed.
>
> Please provide an exact, step-by-step recipe for reproducing this bug,
> starting with `emacs -Q'.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 09 Aug 2011 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.