[LLVMdev] mingw build problems

Jay Foad jay.foad at gmail.com
Tue Apr 21 06:29:21 PDT 2009


I get:

llvm[1]: Compiling Signals.cpp for Debug build
In file included from
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Signals.cpp:33:
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:
In function ‘LONG LLVMUnhandledExceptionFilter(_EXCEPTION_POINTERS*)’:
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:191:
warning: format ‘%08X’ expects type ‘unsigned int’, but argument 3 has
type ‘DWORD’
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:195:
warning: format ‘%08X’ expects type ‘unsigned int’, but argument 3 has
type ‘DWORD’
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:195:
warning: format ‘%08X’ expects type ‘unsigned int’, but argument 4 has
type ‘DWORD’
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:195:
warning: format ‘%08X’ expects type ‘unsigned int’, but argument 5 has
type ‘DWORD’
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:195:
warning: format ‘%08X’ expects type ‘unsigned int’, but argument 6 has
type ‘DWORD’
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:218:
warning: format ‘%04d’ expects type ‘int’, but argument 4 has type
‘DWORD’
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:227:
warning: format ‘%d’ expects type ‘int’, but argument 4 has type
‘DWORD’
/home/foad/svn/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc:229:
warning: format ‘%04d’ expects type ‘int’, but argument 3 has type
‘DWORD’

MinGW's <windef.h> and MSDN both agree that DWORD is a typedef for
"unsigned long":

http://msdn.microsoft.com/en-us/library/cc230318(PROT.10).aspx

so here is a patch to fix these warnings by changing %d to %lu, etc.

Thanks,
Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.dword
Type: application/octet-stream
Size: 1508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090421/8f065de8/attachment.obj>


More information about the llvm-dev mailing list