[llvm-commits] Windows compilation warnings

Villmow, Micah Micah.Villmow at amd.com
Thu Jul 15 16:11:26 PDT 2010


Dimitry, might want to hold off a little bit.
I can provide another patch in an hour or so that should fix ALL of the x64 build warnings. Most of them I'm dealing with by casting them away for now. When I get more time I'll go through and fix the silent 64-to-32 bit truncations. In many of the places, I don't see why there is a need for 64bit integers to be used where either size_t or uint32_t should be used instead.

Micah

-----Original Message-----
From: Dimitry Andric [mailto:dimitry at andric.com] 
Sent: Thursday, July 15, 2010 4:06 PM
To: Villmow, Micah
Cc: llvm-commits
Subject: Re: [llvm-commits] Windows compilation warnings

On 2010-07-15 20:45, Villmow, Micah wrote:
> There are a bunch of windows warnings, here is a patch that fixes some of them.

I assume these are warning fixes for the x64 build on Windows?  Because
the Win32 ToT build just has some warnings about enum values being
truncated, and a few switch statements that only have a default case.

If these fixes are indeed for the Windows x64 build, I would propose not
to simply "cast away" some of those warnings, as they might hide real
issues.

There are *lot* of silent 64-to-32 bit truncations in the codebase, for
example where lengths (usually a size_t) are stuffed into plain int or
unsigned, and ideally these should all be checked to verify there is no
problem with that truncation.

That said, I will apply your patch to an x64 build, and see how many of
the (very many :) warnings go away.






More information about the llvm-commits mailing list