[cfe-commits] Patch to make clang compile and work on Windows using MSVC8

Hartmut Kaiser hartmut.kaiser at gmail.com
Sat Sep 1 15:56:09 PDT 2007


Chris, 

> >>> The compilation still produces a lot of warnings wrt to a 
> possible 
> >>> loss of precision while converting uint64_t's to
> >> uint32_t's. Is this a
> >>> known issue?
> >>> Do you intend to fix these?
> >>
> >> I am unaware of these (compiling clang on MacOS produces 0 
> warnings).
> >
> > Do you want me to fix these? At least I could try :-P
> 
> That would be great :).  I think that this is due to a 
> warning that VC 
> ++ produces that GCC doesn't by default.  Most of these can be
> resolved by inserting the appropriate casts.

The attached patch fixes almost all of the warnings I mentioned. There are
two more warnings I didn't fix in the code:

   warning C4146: unary minus operator applied to unsigned type, result
still unsigned

which I disabled in the project files and

   warning C4715: 'some function name' : not all control paths return a
value

which is always caused by having an 'assert(0 && ...)' as the last statement
in some functions. These are still generated since I do not like to disable
them completely in the project files, and I don't know about any portable
fix for them.

Please note, this patch contains the two other patches I submitted
previously as well.

Regards Hartmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win32.patch.gz
Type: application/x-gzip
Size: 17130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20070901/21153d96/attachment.bin>


More information about the cfe-commits mailing list