[LLVMbugs] [Bug 20050] Function macro expansion with return cast problem

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 17 10:40:41 PDT 2014


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

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rnk at google.com
         Resolution|---                         |INVALID

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
MSVC gives the same diagnostic as clang.  InterlockedExchangePointer() is a
macro in both the Microsoft Windows 8 SDK and in mingw64, and MSVC errors on
your example:

$ cat t.cpp
#include <windows.h>
int main() {
  void *Dest;
  void *Value = 0;
  ::InterlockedExchangePointer(&Dest, Value);
}

$ cl -c t.cpp -nologo
t.cpp
t.cpp(5) : error C2589: '(' : illegal token on right side of '::'
t.cpp(5) : error C2143: syntax error : missing ';' before '::'

Does this code work with mingw gcc?  If so it seems like gcc is accepting
invalid code.

-- 
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/20140617/2382ec9c/attachment.html>


More information about the llvm-bugs mailing list