Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 589b38626859682dda0b4289ae4806af > files > 159

coccinelle-examples-1.0.7-2.mga7.i586.rpm

// This adds a float for one int variable found.
// Doing this however is limited to one int in the data structure, if
// more one int variable in the structure we would not know where to
// place the new one safely order-wise. See plusplus2.cocci for an
// example of dealing with this issue.

@simpleplus@
identifier x,v;
fresh identifier xx = v ## "_float";
@@

struct x {
+	float xx;
	...
	int v;
	...
}