Skip to contentSkip to conversation

scripts/coccinelle: modernize &

PATCH In review Julia Lawall 4 participants 6 messages Feb 17, 2016 – Feb 19, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/coccinelle: modernize &

& is no longer allowed in column 0, since Coccinelle 1.0.4.

---
 scripts/coccinelle/iterators/use_after_iter.cocci |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/iterators/use_after_iter.cocci +1 -1
index f085f59..ce8cc9c 100644
@@ -123,7 +123,7 @@ list_remove_head(x,c,...)
 |
 sizeof(<+...c...+>)
 |
-&c->member
+ &c->member
 |
 c = E
 |
Tested-by on v1 1/1
#1 lore raw
Quoted 14 lines · Julia Lawall

& is no longer allowed in column 0, since Coccinelle 1.0.4.

---
 scripts/coccinelle/iterators/use_after_iter.cocci |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/iterators/use_after_iter.cocci +0 -0
index f085f59..ce8cc9c 100644

scripts/coccinelle/iterators/use_after_iter.cocci list_remove_head(x,c,...) · line 129

Quoted 8 lines
scripts/coccinelle/iterators/use_after_iter.cocci +1 -1
@@ -123,7 +123,7 @@ list_remove_head(x,c,...)
 |
 sizeof(<+...c...+>)
 |
-&c->member
+ &c->member
 |
 c = E
 |

Verified with:
spatch --version
spatch byte-code version 1.0.4-00118-gc7cf750d1c44 compiled with OCaml version 4.01.0

Signature · 2 lines
Regards,
Nishanth Menon
#2 lore raw
Quoted 31 lines · Nishanth Menon
Quoted 14 lines · Julia Lawall

& is no longer allowed in column 0, since Coccinelle 1.0.4.

---
 scripts/coccinelle/iterators/use_after_iter.cocci |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/iterators/use_after_iter.cocci +0 -0
index f085f59..ce8cc9c 100644

scripts/coccinelle/iterators/use_after_iter.cocci list_remove_head(x,c,...) · line 129

Quoted 8 lines
scripts/coccinelle/iterators/use_after_iter.cocci +1 -1
@@ -123,7 +123,7 @@ list_remove_head(x,c,...)
 |
 sizeof(<+...c...+>)
 |
-&c->member
+ &c->member
 |
 c = E
 |

Verified with:
spatch --version
spatch byte-code version 1.0.4-00118-gc7cf750d1c44 compiled with OCaml version 4.01.0

Quoted 1 line

Thanks!

julia

#4 lore raw
In reply to Julia Lawall
Quoted 1 line

& is no longer allowed in column 0, since Coccinelle 1.0.4.

This information corresponds to the support for handling of conjunctions in the semantic patch language which was added with the software release "Coccinelle 1.0.3".
https://systeme.lip6.fr/pipermail/cocci/2015-October/002634.html

scripts/coccinelle/iterators/use_after_iter.cocci list_remove_head(x,c,...) · line 126

Quoted 10 lines
scripts/coccinelle/iterators/use_after_iter.cocci +1 -1
index f085f59..ce8cc9c 100644
@@ -123,7 +123,7 @@ list_remove_head(x,c,...)
 |
 sizeof(<+...c...+>)
 |
-&c->member
+ &c->member

The added space character is not in the first column of this SmPL script.

* Can it be that the additional character will be transformed according to special pretty-printing rules?
https://github.com/coccinelle/coccinelle/issues/37

* Is such a change a possible workaround for open issues around the message "minus: parse error" (or software improvements which were developed in the meantime)?

scripts/coccinelle/iterators/use_after_iter.cocci list_remove_head(x,c,...) · line 129

Quoted 3 lines
scripts/coccinelle/iterators/use_after_iter.cocci +0 -0
 |
 c = E
 |

Does the shown tweak need any further considerations?

Regards,
Markus

#5 lore raw

PATCH 1/1 scripts/coccinelle: modernize &

Quoted 13 lines

scripts/coccinelle/iterators/use_after_iter.cocci list_remove_head(x,c,...) · line 126

Quoted 10 lines
scripts/coccinelle/iterators/use_after_iter.cocci +1 -1
index f085f59..ce8cc9c 100644
@@ -123,7 +123,7 @@ list_remove_head(x,c,...)
 |
 sizeof(<+...c...+>)
 |
-&c->member
+ &c->member

The added space character is not in the first column of this SmPL script.

Quoted 3 lines

* Can it be that the additional character will be transformed according to special pretty-printing rules?
https://github.com/coccinelle/coccinelle/issues/37

I don't understand the question. Spaces in the script (at least before and after the pattern) don't impact spaces in the source code.

Quoted 3 lines

* Is such a change a possible workaround for open issues around the message "minus: parse error" (or software improvements which were developed in the meantime)?

No idea what is referred to here. Maybe you don't like the parse errors, but that is the errors that the parser generator generates. You are welcome to write a parser generator that produces bettwe messages if you like.

Quoted 6 lines

scripts/coccinelle/iterators/use_after_iter.cocci list_remove_head(x,c,...) · line 129

Quoted 3 lines
scripts/coccinelle/iterators/use_after_iter.cocci +0 -0
 |
 c = E
 |

Does the shown tweak need any further considerations?

No idea what is referred to here.

julia