From: PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: cocci <cocci@inria.fr>
Subject: Re: [cocci] how to write an spatch in order to replace guard vs #prama once
Date: Tue, 11 Feb 2025 18:47:06 +0100 (CET) [thread overview]
Message-ID: <1295029600.54623953.1739296026146.JavaMail.zimbra@synchrotron-soleil.fr> (raw)
In-Reply-To: <24871c64-9c5d-238c-201e-d76988bed1a@inria.fr>
something like this
// replace guard by pragma once
@@
expression E;
@@
-#ifndef E
-#define E
+#pragma once
...
-#endif
where the #endif is the matching one of the first #ifndef
Fred
next prev parent reply other threads:[~2025-02-11 17:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 17:35 [cocci] how to write an spatch in order to replace guard vs #prama once PICCA Frederic-Emmanuel
2025-02-11 17:44 ` Julia Lawall
2025-02-11 17:47 ` PICCA Frederic-Emmanuel [this message]
2025-02-11 17:52 ` Julia Lawall
2025-02-11 17:59 ` PICCA Frederic-Emmanuel
2025-02-11 18:04 ` Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295029600.54623953.1739296026146.JavaMail.zimbra@synchrotron-soleil.fr \
--to=frederic-emmanuel.picca@synchrotron-soleil.fr \
--cc=cocci@inria.fr \
--cc=julia.lawall@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).