I'm getting a build failure with -Werror: [off-dbg] : [llvm] /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp: In member function 'llvm::User* llvm::Use::getUser() const': [off-dbg] : [llvm] /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp:142:14: error: cast from type 'const llvm::Use*' to type 'llvm::User*' casts away qualifiers [-Werror=cast-qual] -David
On Wed, Jan 2, 2013 at 1:04 PM, <dag at cray.com> wrote:> I'm getting a build failure with -Werror: > > [off-dbg] : [llvm] /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp: In member function 'llvm::User* llvm::Use::getUser() const': > [off-dbg] : [llvm] /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp:142:14: error: cast from type 'const llvm::Use*' to type 'llvm::User*' casts away qualifiers [-Werror=cast-qual]There's little effort to keep the GCC build warning clean, but I've seen people cleaning up this particular warning, so feel free to commit a fix for it (replacing the c-style cast with a const_cast if it's intended, or just adding "const" to the cast if it wasn't intended/necessary to remove const). We should probably setup a GCC -Werror build bot if we are warning clean for some sufficiently modern version of GCC. - David
David Blaikie <dblaikie at gmail.com> writes:> On Wed, Jan 2, 2013 at 1:04 PM, <dag at cray.com> wrote: >> I'm getting a build failure with -Werror: >> >> [off-dbg] : [llvm] /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp: In member function 'llvm::User* llvm::Use::getUser() const': >> [off-dbg] : [llvm] >> /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp:142:14: error: cast from >> type 'const llvm::Use*' to type 'llvm::User*' casts away qualifiers >> [-Werror=cast-qual] > > There's little effort to keep the GCC build warning clean,Why? It seems like a pertty important compiler to support.> We should probably setup a GCC -Werror build bot if we are warning > clean for some sufficiently modern version of GCC.That would be nice. How can I help move such a thing along? This is with 4.7.1, BTW. -David