[LLVMbugs] [Bug 4285] New: Wide character initialisation doesn't work with const.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat May 30 23:02:21 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=4285

           Summary: Wide character initialisation doesn't work with const.
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ed at 80386.nl
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 3696


The following code doesn't build with Clang:

#include <stdio.h>
#include <wchar.h>

static const wchar_t foo[] = L"Awesome!";

int
main(int argc, char *argv[])
{

        printf("%ls\n", foo);
        return (0);
}

test.c:4:30: error: initialization with '{...}' expected for array
static const wchar_t foo[] = L"Awesome!";
                             ^~~~~~~~~~~
1 diagnostic generated.

When the const keyword is removed, it builds properly.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list