All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] attributes
@ 2017-08-26 12:13 Julia Lawall
  2017-08-28 13:37 ` [Cocci] Addition of support for variable attributes SF Markus Elfring
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2017-08-26 12:13 UTC (permalink / raw)
  To: cocci

People ask from time to time about the possibility of matching attributes,
such as __read_mostly.  It is now (github) possible to match and transform
a single such attribute when it comes after the name of a variable in a
variable declaration.  A possible rule is thus:

@@
identifier i,j;
attribute name __ro_after_init;
@@

*struct i j __ro_after_init =
 { ... };

julia

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

* [Cocci] Addition of support for variable attributes
  2017-08-26 12:13 [Cocci] attributes Julia Lawall
@ 2017-08-28 13:37 ` SF Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2017-08-28 13:37 UTC (permalink / raw)
  To: cocci

> It is now (github) possible to match and transform a single such attribute
> when it comes after the name of a variable in a variable declaration.

This is a nice extension for your software.

How does this information fit to the wording in the manual?
https://github.com/coccinelle/coccinelle/blob/2776ede39f6f4197eaa0fc8344152e5ed07e0ad3/docs/manual/cocci_syntax.tex#L308
??
It is not possible to match or remove an attribute, only to add one.
??


> attribute name __ro_after_init;

Do you imagine any further software evolution if you start the specification
of this metavariable type with two words?

Regards,
Markus

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

end of thread, other threads:[~2017-08-28 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-26 12:13 [Cocci] attributes Julia Lawall
2017-08-28 13:37 ` [Cocci] Addition of support for variable attributes SF 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.