Re: [cocci] Rechecking selected expression list representations
Julia Lawall <[email protected]> Fri, 29 May 2026 09:55:55 +0200 (CEST)
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1609249618-1780041355=:3655 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Fri, 29 May 2026, Markus Elfring wrote: > … > >>>> Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci suggestion6_for_Pierrick_Philippe-20260528.cocci > >>>> … > >>>> @adjusted_display@ > >>>> … > >>>> ( > >>>> *memcmp*(&F.X, E1, E2) > >>>> | > >>>> *memcmp*(E1, &F.X, E2) > >>>> ) > >>>> … > >>>> > >>>> > >>>> Such an information representation seems to be usable somehow. > >>>> But is the expression list output really correct for the function call specification > >>>> in the mentioned test case? > … > > I guess that what is pretty printed is the result of pushing the > > disjunction out to the statement level. > > Why would a “guess” become relevant here? > > Would we prefer to be certain also according to mentioned implementation details? > > > > At that point you can't see > > whether a comma operator is used or whether there is a list of arguments, > > because they look the same. > > Where would you see that “special” comma expressions are passed to function call parameters? The original semantic patch. That is what is parsed, and thus that is where it is decided what a given comma represents. There is no disjunction operation for a fragment of an argument list, only for individual expressions. So you don't get a parse error because there is a way to parse e1,e2 as a single expression. julia > > > > But given the initial code it is the comma > > operator. > Do you eventually try to refer to any OCaml source code? > > Regards, > Markus > --8323329-1609249618-1780041355=:3655--