Hello,

  attached is a small example which seems to
    break up a comment line,
    thus commenting out following lines.

  Please look at the "long reuse" line
    which will have an open comment when spatch is run,
    thus commenting out the following "struct line *options"

Best Regards,
  Robert Larice

// (compile "spatch --sp-file ex5.cocci ex5.c")

// a might be bug report

// in ex5.c there is a comment spawning to lines
// this patch seems to open up this comment (behind "long reuse"),
//   dropping its second half,
//   thus effectively commenting out following lines

@r2@
@@
- struct line
+ struct card
void
foobarbazi(
    struct line *deck,     /*in: the spice deck */
    long reuse,            /*in: TRUE if called from runcoms2.c com_rset,
                             FALSE if called from inp_spsource() */
    struct line *options   /*in: all .option lines from deck */
    )
{
    return 42;
}
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to