All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Specifying that an expression is a string constant?
@ 2019-02-19 20:12 Timur Tabi
  2019-02-19 21:48 ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Timur Tabi @ 2019-02-19 20:12 UTC (permalink / raw)
  To: cocci

The following rule fails with an error on the last line:

@rule3@
expression x, y, z;
@@
-DBG_PRINT_STRING_VALUE(x, y, z);
+NV_PRINTF2(x, y "0x%x\n", z);

Presumably, cocci doesn't know that "y" is a string constant and so
the resulting expression is valid.  I'm guessing that I need to
specify that "y" is a string constant, but even after reading
http://coccinelle.lip6.fr/docs/main_grammar.html, I can't figure out
what that could be.
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-20 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 20:12 [Cocci] Specifying that an expression is a string constant? Timur Tabi
2019-02-19 21:48 ` Julia Lawall
2019-02-20 15:43   ` Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.