On 2014-03-21 23:25 +0100, su_v wrote:
On 2014-03-21 19:39 +0100, Johan Engelen wrote:
Hi all, I'd like people to check what compiler errors are reported for trunk on their system (Windows I can do myself), with these flags:
-Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Werror=switch -Werror=return-type -Werror -Wno-error=pointer-sign -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=strict-overflow -Wno-error=write-strings -Wno-error=format -Wno-error=format-extra-args
Please no comments about whether you like these flags or not, just what build *errors* you get. (don't send me the warnings please!)
System: OS X 10.7.5, Xcode 4.3.2
$ llvm-gcc-4.2 --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
$ clang --version Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
1a) llvm-gcc-4.2: fails during configure:
checking whether the C++ compiler works... no
config.log: cc1plus: error: -Werror=unused-but-set-variable: No option -Wunused-but-set-variable
1b) if '-Werror=unused-but-set-variable' is removed from $CPPFLAGS, build fails here:
I forgot to mention that the first failure with llvm-gcc-4.2 is actually the one from the lcms1 header, too:
CXX color-profile.o cc1plus: warnings being treated as errors In file included from ../../src/color-profile.cpp:36: /Volumes/magenta/mp-trunk/quartz/include/lcms.h: In function ‘void* _cmsMalloc(size_t)’: /Volumes/magenta/mp-trunk/quartz/include/lcms.h:1418: warning: comparison of unsigned expression < 0 is always false make[1]: *** [color-profile.o] Error 1
This below is after having reconfigured to enforce usage of lcms2 (on OS X):
CXX gc.o cc1plus: warnings being treated as errors ../../src/gc.cpp: In function ‘void Inkscape::GC::<unnamed>::do_init()’: ../../src/gc.cpp:31: warning: ‘GC_no_dls’ is deprecated (declared at /Volumes/magenta/mp-trunk/quartz/include/gc/gc.h:257) ../../src/gc.cpp:32: warning: ‘GC_all_interior_pointers’ is deprecated (declared at /Volumes/magenta/mp-trunk/quartz/include/gc/gc.h:143) ../../src/gc.cpp:33: warning: ‘GC_finalize_on_demand’ is deprecated (declared at /Volumes/magenta/mp-trunk/quartz/include/gc/gc.h:159) make[1]: *** [gc.o] Error 1
1c) Running 'make -k' (not a reliable check, I know) to continue:
- All C files produces new warnings: CC libcroco/cr-utils.o
cc1: warning: command line option "-Woverloaded-virtual" is valid for C++/ObjC++ but not for C
- Don't see this error with regular builds, why now?
In file included from /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm.h:89, from /Volumes/magenta/mp-trunk/quartz/include/gdkmm-2.4/gdkmm/pixbuf.h:9, from ../../src/libdepixelize/kopftracer2011.h:32, from ../../src/libdepixelize/kopftracer2011.cpp:36: /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h:201: error: field ‘gobject_’ has incomplete type /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h: In member function ‘GThread* Glib::Threads::Thread::gobj()’: /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h:197: error: ‘gobject_’ was not declared in this scope /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h: In member function ‘const GThread* Glib::Threads::Thread::gobj() const’: /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h:198: error: ‘gobject_’ was not declared in this scope make[3]: *** [libdepixelize/kopftracer2011.o] Error 1
- another warning treated as error:
cc1plus: warnings being treated as errors ../../src/display/nr-filter-gaussian.cpp: In function ‘void Inkscape::Filters::filter2D_IIR(PT*, int, int, const PT*, int, int, int, int, const IIRValue*, const double*, IIRValue* const*, int) [with PT = unsigned char, unsigned int PC = 1u, bool PREMULTIPLIED_ALPHA = false]’: ../../src/display/nr-filter-gaussian.cpp:503: instantiated from here ../../src/display/nr-filter-gaussian.cpp:342: warning: comparison of unsigned expression < 0 is always false ../../src/display/nr-filter-gaussian.cpp:503: instantiated from here ../../src/display/nr-filter-gaussian.cpp:357: warning: comparison of unsigned expression < 0 is always false make[3]: *** [display/nr-filter-gaussian.o] Error 1