[llvm-bugs] [Bug 47653] New: Working in MSVC but not in CLANG
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 26 09:41:58 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47653
Bug ID: 47653
Summary: Working in MSVC but not in CLANG
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: vortexilation at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
How to convert the following MSVC C based code for compatibility with CLANG
compiler?
In MSVC 2019 16.7.4 the following code manage to compile but not in CLANG
-------------------------------------------------------------------------
if (lpOverlapped)
{
bResult = (lpOverlapped->dwCommand == FILE_READ ? ReadFile : WriteFile)(
lpOverlapped->hFile->FileHandle,
lpOverlapped->lpBuffer, lpOverlapped->dwBuffer, &dwResult,
(LPOVERLAPPED)lpOverlapped);
if (! bResult && (dwResult = GetLastError()) != ERROR_IO_PENDING)
{
lpOverlapped->Internal = dwResult;
PostQueuedCompletionStatus(hCompletionPort, 0, (DWORD)-5,
(LPOVERLAPPED)lpOverlapped);
}
}
-------------------------------------------------------------------------
The CLANG error goes as :
-------------------------------------------------------------------------
error : called object type 'void *' is not a function or function pointer
-------------------------------------------------------------------------
For this following line :
-------------------------------------------------------------------------
bResult = (lpOverlapped->dwCommand == FILE_READ ? ReadFile : WriteFile)(
-------------------------------------------------------------------------
How to convert it into CLANG compatible codes?
--
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/20200926/62f16a36/attachment-0001.html>
More information about the llvm-bugs
mailing list