All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Fine-tuning for switch statements
Date: Sun, 10 May 2015 18:28:15 +0200	[thread overview]
Message-ID: <554F871F.6030500@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1505101453460.2645@hadrien>

> @bad exists@
> position p != ok.p;
> expression E,e;
> @@
> switch at p (E) {
> case e: ...
> }

How do you think about to restrict the label "e"
to a constant expression by the means of the semantic
patch language?
http://en.cppreference.com/w/c/language/switch

Does it matter to make the affected SmPL script
a bit more precise?

Regards,
Markus

  reply	other threads:[~2015-05-10 16:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  2:32 [Cocci] Question about the use of "...when !=" in SmPL ZhouYuan
2015-05-09  7:47 ` Nicholas Mc Guire
2015-05-09  8:10   ` [Cocci] Source code analysis around "switch" SF Markus Elfring
2015-05-09  8:28     ` Nicholas Mc Guire
2015-05-09  8:40       ` SF Markus Elfring
2015-05-09  8:36   ` [Cocci] Question about the use of "...when !=" in SmPL Julia Lawall
2015-05-09 10:08     ` Nicholas Mc Guire
2015-05-09 14:09 ` Nicholas Mc Guire
2015-05-09 16:47   ` Julia Lawall
2015-05-10  7:29     ` [Cocci] Data provided by position variables SF Markus Elfring
2015-05-10  8:40       ` Julia Lawall
2015-05-10  8:47         ` SF Markus Elfring
2015-05-09 16:49   ` [Cocci] Question about the use of "...when !=" in SmPL Nicholas Mc Guire
2015-05-10  7:49     ` [Cocci] Improving small SmPL examples SF Markus Elfring
2015-05-10 12:58 ` [Cocci] Question about the use of "...when !=" in SmPL Julia Lawall
2015-05-10 16:28   ` SF Markus Elfring [this message]
2015-05-10 16:31     ` [Cocci] Fine-tuning for switch statements Julia Lawall
2015-05-10 16:34       ` SF Markus Elfring

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=554F871F.6030500@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=cocci@systeme.lip6.fr \
    /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.
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.