X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <50F00B98.9090306@alice.it> Date: Fri, 11 Jan 2013 13:54:48 +0100 From: Angelo Graziosi User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Cygwin Subject: Another issue with CLANG Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 #include 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