Skip to contentSkip to conversation

a small nuisance report

Cocci Robert Larice 2 participants 6 messages Apr 29, 2018

lore
Share & tools
lore
#0 lore raw

Hello,

attached is a small example which
injects a statement and a comment.

It works well, but does'nt do exactly as wanted.

I get :

+ j /* comments are overrated */
+ -= 3;

The comment popped up within the expression instead
of in front of it.
no bug, but uggly.

Regards,
Robert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex2.c
Type: text/x-csrc
Size: 87 bytes
Desc: not available
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20180429/760a0ab8/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ex2.cocci
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20180429/760a0ab8/attachment.ksh>

#1 lore raw
Quoted 9 lines · Robert Larice

Hello,

attached is a small example which
injects a statement and a comment.

It works well, but does'nt do exactly as wanted.

I get :

Review

Quoted 6 lines
(quoted diff) +2 -0
+    j /* comments are overrated */
+    -= 3;
 
  The comment popped up within the expression instead
    of in front of it.
  no bug, but uggly.

Indeed, it should not be there.

julia

Quoted 5 lines

Regards,
Robert

#2 lore raw
In reply to Robert Larice
Quoted 9 lines · Robert Larice

Hello,

attached is a small example which
injects a statement and a comment.

It works well, but does'nt do exactly as wanted.

I get :

Review

Quoted 6 lines
(quoted diff) +2 -0
+    j /* comments are overrated */
+    -= 3;
 
  The comment popped up within the expression instead
    of in front of it.
  no bug, but uggly.

This problem is solve in the github version of Coccinelle. The problem was because j was declared as a symbol.

julia

#3 lore raw
Quoted 14 lines · Julia Lawall
Quoted 12 lines · Robert Larice

Hello,

attached is a small example which
injects a statement and a comment.

It works well, but does'nt do exactly as wanted.

I get :

(quoted diff) +2 -0
+    j /* comments are overrated */
+    -= 3;
Quoted 8 lines
Quoted 3 lines

The comment popped up within the expression instead
of in front of it.
no bug, but uggly.

This problem is solve in the github version of Coccinelle. The problem was because j was declared as a symbol.

julia

Thank You,

so I could work around by simply using an "identifier"
perhaps augmented with a regexp match.

Best Regards,
Robert

#4 lore raw
Quoted 23 lines · Robert Larice
Quoted 21 lines · Julia Lawall
Quoted 9 lines · Robert Larice

Hello,

attached is a small example which
injects a statement and a comment.

It works well, but does'nt do exactly as wanted.

I get :

Review

Quoted 6 lines
(quoted diff) +2 -0
+    j /* comments are overrated */
+    -= 3;
 
  The comment popped up within the expression instead
    of in front of it.
  no bug, but uggly.

This problem is solve in the github version of Coccinelle. The problem was because j was declared as a symbol.

Quoted 6 lines
Quoted 1 line

julia

Thank You,

so I could work around by simply using an "identifier"
perhaps augmented with a regexp match.

No, just pull from github and recompile.

julia

#5 lore raw
Quoted 27 lines · Julia Lawall
Quoted 25 lines · Robert Larice
Quoted 22 lines · Julia Lawall
Quoted 9 lines · Robert Larice

Hello,

attached is a small example which
injects a statement and a comment.

It works well, but does'nt do exactly as wanted.

I get :

Review

Quoted 6 lines
(quoted diff) +2 -0
+    j /* comments are overrated */
+    -= 3;
 
  The comment popped up within the expression instead
    of in front of it.
  no bug, but uggly.

This problem is solve in the github version of Coccinelle. The problem was because j was declared as a symbol.

julia

Quoted 8 lines
Quoted 4 lines

Thank You,

so I could work around by simply using an "identifier"
perhaps augmented with a regexp match.

No, just pull from github and recompile.

julia

just did, and it just works,
Thanks,
Robert