[llvm-bugs] [Bug 27028] New: [ms] __LPREFIX feature of MSVC isn't supported in clang

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 22 04:45:16 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27028

            Bug ID: 27028
           Summary: [ms] __LPREFIX feature of MSVC isn't supported in
                    clang
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ivantarquinn at mail.ru
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This report is about MSVC feature __LPREFIX that adds prefix L to its argument,
for example, it changes its argument's type char[n] to wchar_t[n]. Identifier
__LPREFIX with any argument is unknown for clang. 
=========Environment=============
OS: Win 
Version: trunk

=========Reproducer==============
test.cpp
-----------
int main()
{
  wchar_t* C = __LPREFIX(__FUNCTION__);
  return 0;
}
===========Output================
MSVC compiles clearly

$ clang-cl -c test.cpp
test.cpp(3,16) :  error: use of undeclared identifier '__LPREFIX'

It should work like macro, but it is really not preprocessor macro:
$ cl -E test.cpp
int main()
{
  wchar_t* C = __LPREFIX(__FUNCTION__);
  return 0;
}

=================================
Andrey Skripkin
Software Engineer
Intel Compiler Team

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160322/3d9c8644/attachment.html>


More information about the llvm-bugs mailing list