[LLVMbugs] [Bug 7192] New: clang -Wwrite-strings doesn't allow writing to wchars
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 21 16:31:44 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7192
Summary: clang -Wwrite-strings doesn't allow writing to wchars
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nunoplopes at sapo.pt
CC: llvmbugs at cs.uiuc.edu
$ cat a.c
#include <wchar.h>
void foo(wchar_t *dst) {
dst[0] = 0;
}
$ clang -c -Wwrite-strings a.c
a.c:3:11: error: read-only variable is not assignable
dst[0] = 0;
~~~~~~ ^
1 error generated.
$ gcc -c -Wwrite-strings a.c
(ok)
$ clang -E -o - a.c | grep wchar | grep typedef
typedef __typeof__(*L"") wchar_t;
$ gcc -E -o - a.c | grep wchar | grep typedef
typedef long int wchar_t;
--
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