[LLVMbugs] [Bug 6408] New: cdecl function returning stdcall function pointer not recognized

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Feb 23 09:04:51 PST 2010


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

           Summary: cdecl function returning stdcall function pointer not
                    recognized
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: yann at droneaud.fr
                CC: llvmbugs at cs.uiuc.edu


In wine, the following declaration from file dlls/winex11.drv/opengl.c cannot
be compiled by clang:

typedef long INT_PTR, *PINT_PTR;

typedef INT_PTR (__attribute__((__stdcall__)) *PROC)(void);

PROC __attribute__((__cdecl__)) X11DRV_wglGetProcAddress(LPCSTR lpszProc)
{
}


Here is the error messages:

opengl.c:1782:6: error: cdecl and stdcall attributes are not compatible
PROC CDECL X11DRV_wglGetProcAddress(LPCSTR lpszProc)
     ^
In file included from opengl.c:39:
In file included from ./x11drv.h:57:
../../include/windef.h:166:21: note: instantiated from:
#define CDECL       __cdecl
                    ^
../../include/windef.h:78:35: note: instantiated from:
#   define __cdecl __attribute__((__cdecl__))
                                  ^
1 diagnostic generated.


So bug #5280 is perhaps not fixed.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list