[LLVMdev] misc. patches

Jeff Cohen jeffc at jolt-lang.org
Mon Dec 13 20:20:38 PST 2004


Morten Ofstad wrote:

> Jeff Cohen wrote:
>
>> VS has a 64-bit portability mode, where it will complain when it sees 
>> non-portable code.  I haven't tried it yet on LLVM, but in my 
>> experience it will generate a *lot* of warnings.  Every time a size_t 
>> or ptrdiff_t is assigned to an int or even a long it will complain 
>> (Microsoft defines long as 32-bits, even in win64).  On the other 
>> hand, gcc defines long as 64-bits on 64-bit Unix (so what does it do 
>> on cygwin or mingw?).  The portability warnings are still useful, but 
>> it does mean that "long" must be banished from the code.
>
>
> I'm not trying to eliminate the warnings when compiling LLVM -- I'm 
> trying to eliminate the warnings in applications _using_ LLVM which 
> might be (as in our case) using the 64-bit portability mode. So I only 
> want to patch some very commonly included header files in order to 
> compile our application cleanly. I am absolutely not suggesting to 
> banish "long" from the code.
>
> m.

Didn't mean to imply that you did; however, *I* am suggesting it :-)

But apparently it's not a problem.  64-bit portability warnings were 
already turned on in the project files you created, and precisely zero 
warnings are generated.  LLVM is already 64-bit clean as far as VC++ is 
concerned.  At least the part that gets built with VC++.




More information about the llvm-dev mailing list