On 03/27/2012 11:25 AM, Julia Lawall wrote:
> On Tue, 27 Mar 2012, Michael Stefaniuc wrote:
>
>> On 03/27/2012 11:14 AM, Julia Lawall wrote:
>>> On Tue, 27 Mar 2012, Michael Stefaniuc wrote:
>>>
>>>> On 03/27/2012 12:07 AM, Cyril Roelandt wrote:
>>>>> On 03/26/12 23:56, ron minnich wrote:
>>>>>> @@
>>>>>> identifier f;
>>>>>> type T;
>>>>>> identifer e;
>>>>>> @@
>>>>>> T f(...){<...
>>>>>> -e = i2c_add_adapter(...);
>>>>>> ...>}
>>>>>
>>>>> You wrote "identifer" instead of "identifier" :)
>>>> Julia, shouldn't spatch --parse-cocci complain about that?
>>>
>>> The parser considers it to be a typedef.
>>>
>>> This seems to be a pretty common mistake. Perhaps it should generate a
>>> warning for this specific misspelling.
>> Did that change recently? Because I'm used to write the typedef
>> explicitly, e.g. in this case I would write it as:
>> typedef identifer;
>> identifer e;
>
> It's not necessary, and has never been necessary. It is only needed
> when the typedef shows up in a cast.
Heh, that explains it then. Until now when using the above construct I
needed the type too to get rid of casts and/or to change the type.
bye
michael
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)