From: Markus Elfring <Markus.Elfring@web.de>
To: Alice Lee <Alice.Lee@ist.ac.at>
Cc: cocci@inria.fr
Subject: Re: [cocci] Can Coccinelle parse files where macros are used as binary operations?
Date: Fri, 13 Mar 2026 15:25:37 +0100 [thread overview]
Message-ID: <c25119df-1825-4fd8-bb69-84549affe866@web.de> (raw)
In-Reply-To: <274abdf3dbbe4c3e8f1f33fba516c8b3@ist.ac.at>
> I am trying to use Coccinelle to search C codebases (…)
Nice …
> and I am struggling to understand the scope of the --macro-file argument.
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/233b5ceb1d5a701fb270ebdf0a9bd6be0a6ce53b/docs/manual/spatch_options.tex#L409-412
> Can macros used with #if in the source code be defined in a file passed with --macro-file, and then the right sections of source code are ignored?
I suggest to reconsider corresponding expectations in more detail.
1. Some developers would like to expect that the Coccinelle software
> # Can macros used with #if in the source code be defined in a file passed with --macro-file, and then the right sections of source code are ignored?
1. Some developers would like to expect that the Coccinelle software
can handle source files also without extra preprocessing.
But it was discovered that implementation details are still waiting on
corresponding clarifications.
Exclude macro calls from searches for function implementations
2024-10-28
https://github.com/coccinelle/coccinelle/issues/381
2. Software components can be improved accordingly.
Improve support for the handling of #if conditions
2022-10-29
https://github.com/coccinelle/coccinelle/issues/293
Regards,
Markus
prev parent reply other threads:[~2026-03-13 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 15:43 [cocci] Can Coccinelle parse files where macros are used as binary operations? Alice Lee
2026-03-13 14:12 ` Julia Lawall
2026-03-16 12:56 ` Alice Lee
2026-03-17 11:31 ` Julia Lawall
2026-03-13 14:25 ` Markus Elfring [this message]
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=c25119df-1825-4fd8-bb69-84549affe866@web.de \
--to=markus.elfring@web.de \
--cc=Alice.Lee@ist.ac.at \
--cc=cocci@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