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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs