Closed
Description
Bugzilla Link | 11789 |
Resolution | FIXED |
Resolved on | Sep 07, 2015 01:26 |
Version | unspecified |
OS | Windows NT |
Blocks | llvm/llvm-bugzilla-archive#12477 |
CC | @majnemer,@zmodem,@tritao |
Extended Description
#include <stdio.h>
#define _FOO_STR2WSTR(s) L##s
#define FOO_STR2WSTR(s) _FOO_STR2WSTR(s)
int main() {
//const wchar_t* kFoo = L__FUNCTION__; // doesn't work in cl.exe
const wchar_t* kWFoo = FOO_STR2WSTR(FUNCTION); // works in cl
}
Both gcc and clang don't allow this, but cl.exe does. (gcc and clang support it for e.g. FILE.)
This is used in msvc's c++ standard headers.