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.
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++.
On Mon, 13 Dec 2004, Jeff Cohen wrote:> 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++.I haven't tried the VC project files, but out of curiousity, what pieces are missing? -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
It was too good to be true. While the 64-bit portability warnings were turned on, the specific warnings themselves were being explicitly suppressed by different project settings. Not sure what the point of that was. Anyway, about 1000 warnings are generated. Jeff Cohen wrote:> 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++. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >