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

             Bug #: 11789
           Summary: STR2WSTR(__FUNCTION__) should work in microsoft mode
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


#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.

-- 
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

Reply via email to