Hi,
I believe I've stumbled upon a bug here:
repro.cocci
-------------------
@@
@@
- COCCI_REPLACE_THIS();
+ int x __attribute__((some_attr));
@@
@@
- foo();
+ f(g());
repro.c
-------------------
int main()
{
COCCI_REPLACE_THIS();
}
spatch --sp-file repro.cocci repro.c
-------------------
init_defs_builtins: /usr/lib/coccinelle/standard.h
HANDLING: repro.c
diff =
--- repro.c
+++ /tmp/cocci-output-4924-2aa580-repro.c
@@ -1,4 +1,9 @@
int main()
{
- COCCI_REPLACE_THIS();
+ int x__attribute__((some_attr));
+
+@@
+@@
+- foo();
++ f(g());
}
Apparently this requires the __attribute__ in the first rule *and* the function
call as an argument in the second rule, if I remove either of those the patch
works as intended.
Regards,
Christoph
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci