On Thu, 10 May 2012, SF Markus Elfring wrote:

#define __aligned(x) __attribute__((aligned(x)))

$ spatch --verbose-parsing -in_place -sp_file compare_ether_addr.cocci net/wireless/util.c 2>&1
init_defs_builtins: /usr/local/share/coccinelle/standard.h
HANDLING: net/wireless/util.c
ERROR-RECOV: found sync '}' at line 421
parsing pass2: try again
ERROR-RECOV: found sync '}' at line 421
parse error
  = File "net/wireless/util.c", line 318, column 18,  charpos = 7812
around = '__aligned', whole content = u8 src[ETH_ALEN] __aligned(2);
badcount: 112
bad: }

Has the Coccinelle software got difficulties with parsing of a source file like "/usr/src/linux/include/linux/compiler-gcc.h"?

I think you could test this yourself.

Can they be fixed without extensions to a header file (like "/usr/local/share/coccinelle/standard.h")?

I don't know. In general, it would seem better to have something that is user-configurable.

Can additional checks for the build system help here eventually?

No idea what build system is being referred to.

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to