[Cocci] Problem when using a macro for mangling function names

Ali-Erdem OZCAN ali-erdem.ozcan at st.com
Thu Mar 19 21:54:16 CET 2009


Sorry about the attachment. It happens often to me to forget attaching 
files though..

Thanks for your reactivity,

Erdem


Julia Lawall wrote:
>> However, I encountered a problem with the use of macros for mangling function
>> names. I packaged a minimal file for you to help me on this if you have some
>> time. In the attached foo.c file, there is little function declaration like:
>> void METH(foo)(...){...}
>> The expansion of METH is defined just above as
>> #define METH(a) prefix_##a
>>
>> When I launch spatch on this file, I get the following error message:
>> HANDLING: foo.c
>> WIERD: not a comment:METH
>> WIERD: not a comment:(
>> WIERD: not a comment:foo
>> WIERD: not a comment:)
>> Fatal error: exception Not_found
>>     
>
> Thanks for your message.  It does look like there is some sort of bug.  
> Actually, your file didn't get attached, though.  Could you send your .c 
> file and .cocci file?
>
> thanks,
> julia
>
>   

-------------- next part --------------
@@  expression E; @@

-alloca(E)
+malloc(E)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.c
Type: image/x-xbitmap
Size: 80 bytes
Desc: not available
Url : http://lists.diku.dk/mailman/private/cocci/attachments/20090319/509f3416/foo.xbm


More information about the Cocci mailing list