Hello,

The following code example gets accepted by the Coccinelle software.

@display1@
expression* e;
type t;
@@
*\( sizeof(t) \| sizeof(*e) \)


Would it be nice if another script variant can work together with
such a SmPL disjunction also in this way?

@display2@
expression* e;
type t;
@@
*sizeof( \( t \| *e \) )


elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci 
check_sizeof2.cocci
…
minus: parse error:
  File "check_sizeof2.cocci", line 5, column 17, charpos = 54
  around = '*',
  whole content = *sizeof( \( t \| *e \) )


Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to