[Webkit-unassigned] [Bug 34560] Typedef JSChar to wchar_t in RVCT.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 9 04:29:38 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34560
--- Comment #7 from Kwang Yul Seo <kwangyul.seo at gmail.com> 2010-02-09 04:29:36 PST ---
I did a little experiment with the following code snippet:
#include <wchar.h>
typedef unsigned short JSChar;
typedef wchar_t UChar;
void foo(UChar* u)
{
}
void bar()
{
JSChar* j;
foo(j);
}
RVCT compiles this code without an error in C mode. However, it complains about
the type compatibility in C++ mode.
"a.cpp", line 13: Error: #167: argument of type "JSChar *" is incompatible
with parameter of type "UChar *"
foo(j);
^
a.cpp: 0 warnings, 1 error
wchar_t in C++ is not a simple typedef of short int, it is a unique type with
size of 2. So we need to typedef both JSChar and UChar to wchar_t for
compatibility.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list