On Sat, Oct 22, 2011 at 12:24 AM, James Molloy wrote:> Hi Paul, > > That should be easy enough, because the LLVM build has no warnings in it! > > Some of us build with -Werror, and even with those of us that don't warnings are not tolerated. You're already seeing all the warnings that are coming out of the build :)So, all the "variable might be used uninitialized" warnings are in clang ? Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds
Hi, I haven't seen those errors. Clang and LLVM both build with no warnings on the 3 versions of GCC I test with. MSVC reports loads of warnings however. Cheers, James ________________________________________ From: Csaba Raduly [rcsaba at gmail.com] Sent: 23 October 2011 18:44 To: James Molloy Cc: Paul Berube; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] build warnings On Sat, Oct 22, 2011 at 12:24 AM, James Molloy wrote:> Hi Paul, > > That should be easy enough, because the LLVM build has no warnings in it! > > Some of us build with -Werror, and even with those of us that don't warnings are not tolerated. You're already seeing all the warnings that are coming out of the build :)So, all the "variable might be used uninitialized" warnings are in clang ? Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On Sun, Oct 23, 2011 at 10:34 PM, James Molloy wrote:> Hi, > > I haven't seen those errors. Clang and LLVM both build with no warnings on the 3 versions of GCC I test with. MSVC reports loads of warnings however. >$ make happiness ... Updated to revision 142790. ... make[4]: Entering directory `/home/ecsardu/LLVM/build-tcclab1/tools/clang/tools/libclang' llvm[4]: Compiling CIndex.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CIndexCXX.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CIndexCodeCompletion.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CIndexDiagnostic.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CIndexHigh.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CIndexInclusionStack.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CIndexUSRs.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CIndexer.cpp for Release+Asserts build (PIC) /home/ecsardu/LLVM/llvm/tools/clang/tools/libclang/CIndexUSRs.cpp: In function 'bool clang::cxcursor::getDeclCursorUSR(const clang::Decl*, llvm::SmallVectorImpl<char>&)': /home/ecsardu/LLVM/llvm/tools/clang/tools/libclang/CIndexUSRs.cpp:820:22: warning: cast from type 'const clang::Decl*' to type 'clang::Decl*' casts away qualifiers llvm[4]: Compiling CXCursor.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CXString.cpp for Release+Asserts build (PIC) llvm[4]: Compiling CXType.cpp for Release+Asserts build (PIC) llvm[4]: Compiling IndexBody.cpp for Release+Asserts build (PIC) llvm[4]: Compiling IndexDecl.cpp for Release+Asserts build (PIC) llvm[4]: Compiling IndexTypeSourceInfo.cpp for Release+Asserts build (PIC) llvm[4]: Compiling Indexing.cpp for Release+Asserts build (PIC) llvm[4]: Compiling IndexingContext.cpp for Release+Asserts build (PIC) /home/ecsardu/LLVM/llvm/tools/clang/tools/libclang/IndexingContext.cpp: In member function 'void clang::cxindex::IndexingContext::handleReference(const clang::NamedDecl*, clang::SourceLocation, const clang::NamedDecl*, const clang::DeclContext*, const clang::Expr*, CXIdxEntityRefKind)': /home/ecsardu/LLVM/llvm/tools/clang/tools/libclang/IndexingContext.cpp:401:68: warning: cast from type 'const clang::Decl*' to type 'clang::Decl*' casts away qualifiers llvm[4]: Linking Release+Asserts Shared Library libclang.so This is with gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux) on openSUSE 11.3 "Teal" Also gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) on Ubuntu 10.04 LTS -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds
James,> [ 94%] [ 94%] Building CXX object > tools/clang/tools/libclang/CMakeFiles/libclang.dir/IndexingContext.cpp.o > Building CXX object > tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/M > emRegion.cpp.o > Linking CXX shared library ../../../../lib/liblibclang.soI am suspicious, I guess you might not enable optimization on cmake build. 1) make sure with "make VERBOSE=1" 2) make sure you would set proper CMAKE_BUILD_TYPE, or CMAKE_CXX_FLAGS. ...Takumi
Takumi, VERBOSE=1 only changes the makefile to not output colour and to output the entire command line. AFAIK it does not unsurpress any warnings. AFAIK no warnings are surpressed, although that is of course possible. Cheers, James -----Original Message----- From: NAKAMURA Takumi [mailto:geek4civic at gmail.com] Sent: 24 October 2011 11:16 To: James Molloy Cc: Csaba Raduly; llvmdev Subject: Re: [LLVMdev] build warnings James,> [ 94%] [ 94%] Building CXX object > tools/clang/tools/libclang/CMakeFiles/libclang.dir/IndexingContext.cpp.o > Building CXX object >tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/M> emRegion.cpp.o > Linking CXX shared library ../../../../lib/liblibclang.soI am suspicious, I guess you might not enable optimization on cmake build. 1) make sure with "make VERBOSE=1" 2) make sure you would set proper CMAKE_BUILD_TYPE, or CMAKE_CXX_FLAGS. ...Takumi
On Mon, Oct 24, 2011 at 10:07 AM, James Molloy wrote:> That's interesting, what version of GCC are you using? >As I said, gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux) on openSUSE 11.3 "Teal" Also gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) on Ubuntu 10.04 LTS -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds