I noticed that applying this patch:

<<<<<<<<
@@
int x;
@@
-       switch (x) {
-       }
>>>>>>>>

to this source file:

<<<<<<<<
int foo(int x)
{
        switch (x) {
        }
        return 42;
}
>>>>>>>>

yields this output:

<<<<<<<<
--- switch.c    2011-06-20 00:46:05.885328132 -0700
+++ /tmp/cocci-output-18145-a50278-switch.c     2011-06-20 00:48:37.377355864 
-0700
@@ -1,6 +1,5 @@
 int foo(int x)
 {
-       switch (x) {
        }
        return 42;
 }
>>>>>>>>

It seems the closing brace isn't getting deleted?

I'm using 1.0.0rc3.
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to