This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Another issue with CLANG


An application which need to be built with clang++, fails to build when it includes glx.h and indirectly windows.h headers like in the test case shown below.

In short, X11/Xlib.h define Status as a macro (an alias for int) instead rpcdce.h uses Status a a pointer variable name...

Ciao,
 Angelo.

$ cat foo.cxx
#include <GL/glx.h>
#include <windows.h>


int foo() { return 0; }

$ clang++ -D_X86_=1 -c foo.cxx -o foo.o
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:88:
In file included from /usr/include/w32api/rpc.h:70:
/usr/include/w32api/rpcdce.h:142:88: error: expected ')'
...RPC_OBJECT_INQ_FN(UUID *ObjectUuid,UUID *TypeUuid,RPC_STATUS *Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
/usr/include/w32api/rpcdce.h:142:43: note: to match this '('
typedef void __RPC_API RPC_OBJECT_INQ_FN(UUID *ObjectUuid,UUID...
^
/usr/include/w32api/rpcdce.h:471:145: error: expected ')'
...__LONG32 KeyVer,void **Key,RPC_STATUS *Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
/usr/include/w32api/rpcdce.h:471:54: note: to match this '('
typedef void (__RPC_API *RPC_AUTH_KEY_RETRIEVAL_FN)(void *Arg,unsigned short...
^
/usr/include/w32api/rpcdce.h:513:81: error: expected ')'
...int RPC_ENTRY UuidCompare(UUID *Uuid1,UUID *Uuid2,RPC_STATUS *Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
/usr/include/w32api/rpcdce.h:513:44: note: to match this '('
RPCRTAPI signed int RPC_ENTRY UuidCompare(UUID *Uuid1,UUID *Uuid2,RPC_STATUS...
^
/usr/include/w32api/rpcdce.h:515:72: error: expected ')'
RPCRTAPI int RPC_ENTRY UuidEqual(UUID *Uuid1,UUID *Uuid2,RPC_STATUS *Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
/usr/include/w32api/rpcdce.h:515:35: note: to match this '('
RPCRTAPI int RPC_ENTRY UuidEqual(UUID *Uuid1,UUID *Uuid2,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:516:69: error: expected ')'
RPCRTAPI unsigned short RPC_ENTRY UuidHash(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
/usr/include/w32api/rpcdce.h:516:45: note: to match this '('
RPCRTAPI unsigned short RPC_ENTRY UuidHash(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:517:59: error: expected ')'
RPCRTAPI int RPC_ENTRY UuidIsNil(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
/usr/include/w32api/rpcdce.h:517:35: note: to match this '('
RPCRTAPI int RPC_ENTRY UuidIsNil(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:547:140: error: expected ')'
...__LONG32 RequestedMgmtOperation,RPC_STATUS *Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
/usr/include/w32api/rpcdce.h:547:53: note: to match this '('
typedef int (__RPC_API *RPC_MGMT_AUTHORIZATION_FN)(RPC_BINDING_HANDLE...
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:88:
In file included from /usr/include/w32api/rpc.h:70:
In file included from /usr/include/w32api/rpcdce.h:623:
/usr/include/w32api/rpcdcep.h:220:62: error: cannot combine with previous
'type-name' declaration specifier
RPCRTAPI __LONG32 RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:88:
In file included from /usr/include/w32api/rpc.h:87:
/usr/include/w32api/rpcasync.h:118:11: error: cannot combine with previous
'type-name' declaration specifier
ULONG Status;
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:97:
In file included from /usr/include/w32api/winscard.h:10:
In file included from /usr/include/w32api/wtypes.h:8:
In file included from /usr/include/w32api/rpcndr.h:21:
/usr/include/w32api/rpcnsip.h:21:81: error: cannot combine with previous
'type-name' declaration specifier
...RPC_ENTRY I_RpcNsRaiseException(PRPC_MESSAGE Message,RPC_STATUS Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:97:
In file included from /usr/include/w32api/winscard.h:10:
In file included from /usr/include/w32api/wtypes.h:8:
/usr/include/w32api/rpcndr.h:674:160: error: cannot combine with previous
'type-name' declaration specifier
...*pCommStatus,unsigned __LONG32 *pFaultStatus,RPC_STATUS Status);
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:102:
/usr/include/w32api/winspool.h:56:11: error: cannot combine with previous
'type-name' declaration specifier
DWORD Status;
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:102:
/usr/include/w32api/winspool.h:80:11: error: cannot combine with previous
'type-name' declaration specifier
DWORD Status;
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:102:
/usr/include/w32api/winspool.h:240:11: error: cannot combine with previous
'type-name' declaration specifier
DWORD Status;
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:102:
/usr/include/w32api/winspool.h:256:11: error: cannot combine with previous
'type-name' declaration specifier
DWORD Status;
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:102:
/usr/include/w32api/winspool.h:282:11: error: cannot combine with previous
'type-name' declaration specifier
DWORD Status;
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
In file included from foo.cxx:2:
In file included from /usr/include/w32api/windows.h:102:
/usr/include/w32api/winspool.h:308:11: error: cannot combine with previous
'type-name' declaration specifier
DWORD Status;
^
/usr/include/X11/Xlib.h:87:16: note: expanded from macro 'Status'
#define Status int
^
17 errors generated.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]