[LLVMbugs] [Bug 20050] New: Function macro expansion with return cast problem
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 16 04:53:03 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20050
Bug ID: 20050
Summary: Function macro expansion with return cast problem
Product: clang
Version: 3.4
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: paul.tankard at sumo-digital.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Possibly Windows only (don't have different machine to test)
clang version 3.4.1 (207424)
Target: i686-pc-mingw32
Thread model: posix
In visual studio, cpp file is including interlockedapi.h which has the
following definition.
#define InterlockedExchangePointer(Target, Value) \
(PVOID)InterlockedExchange((PLONG)(Target), ((LONG)(LONG_PTR)(Value)))
When invoked in code via
return ::InterlockedExchangePointer(Dest, Exchange);
The following is produced.
error : unexpected parenthesis after '::'
1> return ::InterlockedExchangePointer(Dest, Exchange);
1> ^
1> C:\Program Files (x86)\Windows Kits\8.0\include\um\interlockedapi.h(76,4) :
note: expanded from macro 'InterlockedExchangePointer'
1> (PVOID)InterlockedExchange((PLONG)(Target), ((LONG)(LONG_PTR)(Value)))
error : expected '(' for function-style cast or type construction
1> return ::InterlockedExchangePointer(Dest, Exchange);
1> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> C:\Program Files (x86)\Windows Kits\8.0\include\um\interlockedapi.h(76,11)
: note: expanded from macro 'InterlockedExchangePointer'
1> (PVOID)InterlockedExchange((PLONG)(Target), ((LONG)(LONG_PTR)(Value)))
--
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/20140616/43156368/attachment.html>
More information about the llvm-bugs
mailing list