On Fri, 3 Jan 2020, David Young wrote: > On Fri, Jan 03, 2020 at 07:32:09AM +0100, Julia Lawall wrote: > > I think that the problem is that there is no ; in the uses of your macro. > > I was afraid of that. > > > The proper way to write such a macro, independent of Coccinelle, is as a > > while do(0) loop, so that the uses can end in a semicolon. Then there is > > no possibility of strange mistakes if someone actually does put a > > semicolon. Would that be feasible to do? > > I would prefer that the macros were written with the do-while pattern, > but it's a legacy codebase that uses HGOTO_ERROR() no fewer than 12,000 > times, and most occurrences have no semicolon. I will have to automate > the conversion, and I guess that I cannot use spatch to do it. :-) I may > be able to write a suitable vim macro.
You should now be able to update the arguments, despite the lack of a semicolon. julia _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci