[cfe-dev] bug in wchar_t initializing

Roman Divacky rdivacky at freebsd.org
Fri Dec 19 04:31:02 PST 2008


On Fri, Dec 19, 2008 at 01:26:12PM +0100, Paolo Bolzoni wrote:
> 
> wc.c contents:
> #include <wchar.h>
> int main(){
>    wchar_t wb[] = L"Hi\300";
> }
> 
> $ clang wc.c 
> clang:4:19: error: initialization with '{...}' expected for array
>    wchar_t wb[] = L"Hi\300";
>                   ^~~~~~~~~
> 1 diagnostic generated.
> $
> 
> I am pretty sure it should be possible initialise a wchar_t[] this way.

I already played with that... http://www.vlakno.cz/~rdivacky/wchar.patch                                                                        

there were some comments about the patch but I didnt have the time to
look at it. Also, note that wchars are not yet supported so even
with this fixed the code wont compile anyway :)

roman



More information about the cfe-dev mailing list