On Wed, 7 Jul 2010, Lucas De Marchi wrote:
> On Wed, Jul 7, 2010 at 7:03 AM, Julia Lawall <[email protected]> wrote:
> > I understand the problem, but I am not sure whether I can fix it without
> > breaking many other things. For the moment, you can just add the
> > definition of __UNUSED__ to standard.h. If it is not possible to solve
> > the problem, I could add the definition to the standard.h of the
> > distribution as well, since I guess this is a common idiom.
>
>
> I added this definition to a standard.h that I am passing as
> -macro_file_builtins and it's working. I am about to commit another
> patch to EFL generated by Coccinelle.
>
> Another problem that we have with attributes is that sometimes people
> inadvertently add them to functions. One example is the __attribute__
> ((pure)). Is it possible to write a semantic patch that searches for
> these attributes and verify if the function is really pure? The second
> part I think is not difficult, but given those attributes are defined
> in the standard.h, I could not successfully search for them.
I'm not completely sure to understand what the code looks like, so perhaps
you could send an example.
You can always make your own standard.h, removing the things you don't
want, and provide that file with -macro_file_builtins. But I'm not sure
if that will be good enough to solve the problem in this case.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)