From: Chong Yidong <cyd@stupidchicken.com>
To: "Odekirk\, Shawn" <Shawn.Odekirk@intelligrated.com>
Cc: 5388@debbugs.gnu.org
Subject: bug#5388: 23.1; syntactic analysis incorrect
Date: Sat, 16 Jan 2010 16:00:14 -0500 [thread overview]
Message-ID: <873a25ix41.fsf@stupidchicken.com> (raw)
In-Reply-To: <FC2C3FA683E4BB4AA19A2C8F01153DD20252AD29@cinemail2.na.FKILogistex.Local>
> 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'.
next prev parent reply other threads:[~2010-01-16 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 14:23 bug#5388: 23.1; syntactic analysis incorrect Odekirk, Shawn
2010-01-16 21:00 ` Chong Yidong [this message]
2011-07-11 21:26 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873a25ix41.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=5388@debbugs.gnu.org \
--cc=Shawn.Odekirk@intelligrated.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.