Re: [Libclc-developers] Some more comments to the current CVS tree
Status: Planning
Brought to you by:
augestad
|
From: Jan E. <je...@li...> - 2003-04-03 13:55:20
|
>> doc/string/clc_stralloc.txt:
>> char *s = clc_stralloc("foo", "bar", (char *)0);
>>
>> Can't we assume that NULL is (something casted) 0? Yet,
>> NULL is defined as (void *)0, but that is not a big difference
>> to (char *)0. Even (int *)0 would work, wouldn't it?
>
>No.
>
>(char *)0 is an argument that is part part of the ellipsis
>in the variadic function. So, there is no type conversion:
>an arg of the exact type muist be pass, therefore the cast.
>If a bare 0 is passed, then an int is passed, and
umm I proposed (void *)0, which is not a bare 0, but may
not necessarily be (char*)0?
- Jan Engelhardt
|