Coccinelle archive on
 help / color / Atom feed
From: "Christoph Böhmwalder" <>
Subject: [Cocci] Remove entire multidecl
Date: Thu, 8 Aug 2019 12:51:22 +0200
Message-ID: <> (raw)

So I've looked around in the demos/ and tests/ as well as the documentation,
but I can't seem to figure out what I'm doing wrong:

int x, y;

identifier x, y;
- int x, y;

Should be pretty straightforward, but the rule does not match. Is there
another syntax to use here? In my real use case, I'm trying the same thing
within a function, and that doesn't match either.

Also, while playing around with it, I found this weird behaviour:

identifier x, y;
- int x;


--- test.c
+++ /tmp/cocci-output-6916-8bc8e1-test.c
@@ -1 +1 @@
-int x, y;

Not exactly what I expected...

Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage
Cocci mailing list

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 10:51 Christoph Böhmwalder [this message]
2019-08-08 11:01 ` Julia Lawall
2019-08-09  6:33   ` Markus Elfring

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Coccinelle archive on

Archives are clonable:
	git clone --mirror cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ \
	public-inbox-index cocci

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox