public inbox for cocci@systeme.lip6.fr
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Mathias Krause <minipli@grsecurity.net>
Cc: cocci@inria.fr
Subject: Re: [cocci] Matching function pointer casts
Date: Wed, 10 Dec 2025 15:25:35 +0100	[thread overview]
Message-ID: <2bf7a6df-e3d1-4468-8a8e-632258e00587@web.de> (raw)
In-Reply-To: <c1622b03-ada2-4978-92ee-268b0868671c@grsecurity.net>

> I meanwhile found a workaround but it's ugly -- not because cocci fails
> to match on function pointer casts (I implemented that by making use of
> its python script capabilities) but because of actual source code
> guards, the function pointer assignments are wrapped in.
> 
> It's an '#if ... #else ... #endif' block that, apparently, doesn't get
> processed correctly. The preprocessor condition is non-trivial as in not
> simply being "0" or "1" but still easy enough to handle (one level of indirection).

Thanks for such background information.

There are some development challenges remaining for better support
of conditional “compilation” (or analysis) also by the means of the Coccinelle software.

Regards,
Markus

      parent reply	other threads:[~2025-12-10 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 14:12 [cocci] Matching function pointer casts Mathias Krause
2025-12-10 11:12 ` Markus Elfring
     [not found]   ` <c1622b03-ada2-4978-92ee-268b0868671c@grsecurity.net>
2025-12-10 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=2bf7a6df-e3d1-4468-8a8e-632258e00587@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=minipli@grsecurity.net \
    /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