On Dec 8, 2007, at 6:59 AM, Steve Naroff wrote:
> This is a missing feature that will be added later today...
>
> I need to review a patch by Anders Carlsson that fixes this missing
> feature...
Thanks for looking into this Steve and Anders. When this happens,
please verify that the initializer also gets the appropriate type.
Specifically, there should be an implicit cast from pointer to char to
an array of char, and the type of that cast needs to have the
appropriate array size.
Thanks for diving in Steve,
-Chris
>
> Thanks for the bug,
>
> snaroff
>
> On Dec 8, 2007, at 5:33 AM, Alexey Zakhlestin wrote:
>
>> $ cat test.c
>> int main(void)
>> {
>> static char const test[] = "test";
>> }
>>
>> $ clang -fsyntax-only test.c
>> test.c:3:20: error: variable has incomplete type 'char const []'
>> static char const test[] = "test";
>> ^
>> 1 diagnostic generated.
>>
>>
>> gcc-4.0 takes this construction easily.
>> originally found in bison-generated source
>>
>>
>> --
>> Alexey Zakhlestin
>> http://blog.milkfarmsoft.com/
>> _______________________________________________
>> cfe-dev mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
> _______________________________________________
> cfe-dev mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev