On Sun, 10 Oct 2010, Vasiliy Kulikov wrote:

> Hi,
> 
> Is it possible to differ pointers and array names?

Actually, the problem was just for constant strings.  I have changed them 
from pointer type to array type.

thanks,
julia

> Currently coccinelle thinks that they are the same.  But it's not true,
> at least they have different sizes:
> 
> @@
> type T;
> T* x;
> @@
> 
> *sizeof(x)
> --
> 
>      printf("sizeof(\"123\") = %d, sizeof((char*)\"123\") = %d\n", 
> -            sizeof("123")     ,
> -            sizeof((char*)"123"));
> 
> 
> //output on x86_64:
> sizeof("123") = 4, sizeof((char*)"123") = 8
> 
> 
> 
> Thanks,
> 
> -- 
> Vasiliy
> _______________________________________________
> Cocci mailing list
> [email protected]
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
> 
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to