07.09.2015 13:21, Paolo Bonzini wrote:
> Coccinelle chokes on some idioms from compiler.h and queue.h.
> Extract those in a macro file, to be used with "--macro-file
> scripts/cocci-macro-file.h".
Applied to -trivial, thank you!
/mjt
On 09/09/2015 05:51 AM, Paolo Bonzini wrote:
>
>
> On 08/09/2015 20:35, Markus Armbruster wrote:
Having not used Coccinelle yet, what happens if any of these functions
become desynchronized ?
>> Coccinelle transforms C to C. Problem: if you parse C the normal way
>> (first run prepro
On 08/09/2015 20:35, Markus Armbruster wrote:
>> > Having not used Coccinelle yet, what happens if any of these functions
>> > become desynchronized ?
> Coccinelle transforms C to C. Problem: if you parse C the normal way
> (first run preprocessor, then the parser proper), you have to unparse
>
John Snow writes:
> On 09/07/2015 06:21 AM, Paolo Bonzini wrote:
>> Coccinelle chokes on some idioms from compiler.h and queue.h.
>> Extract those in a macro file, to be used with "--macro-file
>> scripts/cocci-macro-file.h".
>>
>> Signed-off-by: Paolo Bonzini
>> ---
>> scripts/cocci-macro-fil
On 09/07/2015 06:21 AM, Paolo Bonzini wrote:
> Coccinelle chokes on some idioms from compiler.h and queue.h.
> Extract those in a macro file, to be used with "--macro-file
> scripts/cocci-macro-file.h".
>
> Signed-off-by: Paolo Bonzini
> ---
> scripts/cocci-macro-file.h | 119
> ++
Paolo Bonzini writes:
>> > +/* From qemu/compiler.h */
>> > +#define QEMU_GNUC_PREREQ(maj, min) 1
>> > +#define QEMU_NORETURN __attribute__ ((__noreturn__))
>> > +#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
>> > +#define QEMU_SENTINEL __attribute__((sentinel))
>> > +#defin
> > +/* From qemu/compiler.h */
> > +#define QEMU_GNUC_PREREQ(maj, min) 1
> > +#define QEMU_NORETURN __attribute__ ((__noreturn__))
> > +#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
> > +#define QEMU_SENTINEL __attribute__((sentinel))
> > +#define QEMU_ARTIFICIAL __attribute_
Paolo Bonzini writes:
> Coccinelle chokes on some idioms from compiler.h and queue.h.
> Extract those in a macro file, to be used with "--macro-file
> scripts/cocci-macro-file.h".
>
> Signed-off-by: Paolo Bonzini
I tested this as follows. Coccinelle can report on its parsing
difficulties:
$ s
Coccinelle chokes on some idioms from compiler.h and queue.h.
Extract those in a macro file, to be used with "--macro-file
scripts/cocci-macro-file.h".
Signed-off-by: Paolo Bonzini
---
scripts/cocci-macro-file.h | 119 +
1 file changed, 119 insertions(