On 08/18/2011 10:05 PM, Julia Lawall wrote:
> On Thu, 18 Aug 2011, Kamil Pilch wrote:
>
>> Spatch is tripping up on lines that have single quotes. For example, I'm
>> getting
>> spurious patch hunks like this all over the place:
>>
>> - FN('XYZ', ARG(hA), ARG(hB), ARG(hC));
>> + FN('X'YZ',' ARG(hA), ARG(hB), ARG(hC));
>
> Long characters like that are not accepted by the C lexer. The next
> character is then assumed to be the character anyway. I will try to allow
> longer characters to be accepted. Otherwise, the function that contains
> such code will be ignored.
The C standard says the handling of those is implementation dependent.
Wine had a few of those too and we use the opportunity of static
analyses tools tripping over them to fix our code ;)
http://c0x.coding-guidelines.com/6.4.4.4.html
"885 The value of an integer character constant containing more than one
character (e.g., 'ab'), or containing a character or escape sequence
that does not map to a single-byte execution character, is
implementation-defined."
Of course coccinelle needs to still parse them though it might make
sense to warn if it detects them.
bye
michael
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)