On Mon, 20 Jun 2011, Matthew Dempsky wrote:

> 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?

Switches are very poorly supported.  I can try to look at it, but I am not 
sure I will be successful in fixing it...

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to