All of lore.kernel.org
 help / color / mirror / Atom feed
* [cocci] Avoiding duplicate elements in SmPL disjunctions?
@ 2025-11-08  9:50 Markus Elfring
  2025-11-22 10:35 ` Markus Elfring
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Elfring @ 2025-11-08  9:50 UTC (permalink / raw)
  To: cocci

Hello,

I tried the following script variant out for the semantic patch language.

@display@
statement s;
@@
*while (1)
    s


Questionable test result (according to the software combination “Coccinelle 1.3.0”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/janitor> /usr/bin/spatch --parse-cocci show_unlimited_while_loops.cocci
…
(
*while *(*1*) 
|
*while *(*1 *!= *0*) 
|
*while *(*1*) 
|
*while *(*0 *!= *1*) 
)s
…


An element of the generated SmPL disjunction got repeated somehow.
How do you think about to avoid such duplicate code?

Regards,
Markus

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-08-26 10:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-08  9:50 [cocci] Avoiding duplicate elements in SmPL disjunctions? Markus Elfring
2025-11-22 10:35 ` Markus Elfring
     [not found]   ` <188e41fa-91c5-b09c-51d1-8f69f5d8cea@inria.fr>
2025-11-22 14:54     ` Markus Elfring
2025-11-23 10:00     ` Markus Elfring
     [not found]       ` <c23ff4fa-b44e-f653-8015-9c573ae2ad47@inria.fr>
2025-11-23 10:15         ` Markus Elfring
2026-08-25 16:32   ` Markus Elfring
2026-08-25 16:40     ` Julia Lawall
2026-08-25 19:27       ` Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.