All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse@redhat.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] Coccinelle is confuse by extern __printf macro (ie attribute)
Date: Fri, 8 Mar 2019 13:15:19 -0500	[thread overview]
Message-ID: <20190308181519.GA5618@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1902280804520.2813@hadrien>

On Thu, Feb 28, 2019 at 08:05:31AM +0100, Julia Lawall wrote:
> 
> 
> On Wed, 27 Feb 2019, Jerome Glisse wrote:
> 
> > Coccinelle get confuse with kernel extern __printf macro for instance:
> >
> > test.c:
> > extern __printf(3, 4)
> > int foo(int, int, char *, ...);
> > void toto(int, long);
> >
> > test.sp:
> > @@
> > @@
> > void toto(int,
> > +void *,
> > long);
> >
> > The semantic patch will not work. But if extern is remove or if __printf
> > macro is remove then it works. Also having extern and __printf on different
> > line make it works.
> 
> Maybe adding
> 
> #define __printf(a,b)
> 
> to standard.h will help?
> 

Sorry to get back so late, yes adding #define __printf(a,b) to standard.h
solve the issue. Thank you for the pointer.

Cheers,
Jérôme
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

      reply	other threads:[~2019-03-08 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  0:43 [Cocci] Coccinelle is confuse by extern __printf macro (ie attribute) Jerome Glisse
2019-02-28  7:05 ` Julia Lawall
2019-03-08 18:15   ` Jerome Glisse [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=20190308181519.GA5618@redhat.com \
    --to=jglisse@redhat.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@lip6.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 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.