Created attachment 125410 [details] Patch proposal I'm currently building our project with gcc 5.2. Using cppunit cppunit/extensions/HelperMacros.h header with gcc flag -Wzero-as-null-pointer-constant triggers warnings: [...]include/cppunit/extensions/HelperMacros.h:171:31: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] CppUnitExDeleter() : suite (0) {} \ ^ [...]include/cppunit/extensions/HelperMacros.h:174:45: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] CPPUNIT_NS::TestSuite *tmp = suite; suite = NULL; return tmp; \ ^ As stated in gcc documentation, this warning is used to facilitate the conversion to nullptr in C++11 [1] Using nullptr is the c++11 way to initialize pointers with null value [2]. I've created a patch for the branch feature/c++11. [1] https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Warning-Options.html [2] http://en.cppreference.com/w/cpp/language/nullptr
Confirmed.
Pushed to the c++11 branch as https://cgit.freedesktop.org/libreoffice/cppunit/commit/?h=feature/c%2b%2b11 Note that I will most likely remove this class in a follow-up commit as it can be replaced by std::unique_ptr Thanks a lot for your patch.
That was a bad link. The correct one is https://cgit.freedesktop.org/libreoffice/cppunit/commit/?h=feature/c%2b%2b11&id=c2bb6da6cf469e44129ccc9f13e60e74d3cedef4 And the whole class has been removed with https://cgit.freedesktop.org/libreoffice/cppunit/commit/?h=feature/c%2b%2b11&id=840675f45d1245732b0f3ae5c1a5b4fc5fffec7b Currently it looks like this branch will make it into the next release. C++11 support is mature enough in all browsers to be used as default.
Cppunit 1.14 with this improvement has been released.