[Cocci] Re: problems with typecasts
Yoann Padioleau
padator at wanadoo.fr
Thu Mar 5 18:01:26 CET 2009
Julia Lawall <julia at diku.dk> writes:
>> > If you really want to combine them,
>> > you could say:
>> >
>> >
>> > (
>> > read
>> > |
>> > write
>> > )
>> > (...,
>> > - (T)
>> > b)
>> >
>> > (Note that there is a space before the ( in the sixth line)
>> >
>>
>> Unfortunately, that semantic patch does not match any code with read
>> because read only takes one parameter and the pattern has a comma. If I
>> remove the comma from the pattern, spatch complains about invalid syntax.
>
> Did you try it? Normally ..., matches no arguments as well. I tried:
Maybe the syntax for that is not intuitive enough ?
Do we want to allow the '...' without the comma after
to mean multiple or nothing as Carl-Daniel intuitively wrote
the first time ?
More information about the Cocci
mailing list