http://llvm.org/bugs/show_bug.cgi?id=9984
Summary: failure of wide string literals defined inside a macro
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
the following code produces an error:
#define TESTL(x) L#x
const wchar_t* a = L"Hello World";
const wchar_t* b = TESTL(Hello World);
The preprocessor appears to ignore the L inside the define as the literal
declaring the string as a wide string. The code not using the macro passes
without error.
Here is the analyzer output:
"Use of undeclared identifier 'L'"
This fails on both using the analyzer that ships with XCode 4.0.1 as well as
svn trunk (test at revision 131851).
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs