id summary reporter owner description type status milestone component version severity resolution keywords cc 3924 [PATCH] gcc warning cleanup Tatu Kilappa "Compiling software using Boost with aggressive warning flags causes excessive amounts of gcc warning barf. For example: > make clean all 2>&1 | wc -l 1432 > make clean all 2>&1 | grep -iv boost | wc -l 254 This is a real-life example from a relatively small project using gil and property_tree. Needless to say, finding my own errors is kind of tedious. Attached is a patch that fixes all the warnings I encountered: - BOOST_MSVC_WORKAROUND_GUARD is defined in boost/detail/workaround.hpp, but BOOST_MSVC_FULL_VER_WORKAROUND_GUARD is not. This causes a lot of warnings. - boost/exception/exception.hpp has a rethrow function, that GCC reports as a possible candidate for noreturn. I added a BOOST_WORKAROUND to check for gcc version >= 3. On match, __attribute__((noreturn)) was added. Note that in reality noreturn was introduced in GCC 2.5, but I don't know how you should check against that in Boost. - gil has excessive amounts of function parameters, that have the same name as a method within the class. All of these parameter names have been prefixed with ""p_"". - property_tree has excessive amounts of function parameters, that have the same name as a method within the class. All of these parameter names have been prefixed with ""p_"". - property_tree has some instances of variables within functions, that have the same name as a method within the class. All of these variable names have been prefixed with something deemed appropriate. - multi_index had issues similar to those of property_tree and gil. I've listed the patch as cosmetic, because it does not modify any behavior in any way. The patch is against the SVN revision 59655 of yesterday night, and should work just fine. If you're not satisfied with the name changes, you can easily just replace the p_ with whatever. To reproduce the warnings without the patch, compile with the following GCC flags: -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Werror=return-type -Wextra -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wno-multichar -Wpacked -Wredundant-decls -Wshadow -Wswitch-default -Wundef -Wwrite-strings -Wctor-dtor-privacy -Werror=non-virtual-dtor -Woverloaded-virtual" Patches closed To Be Determined None Boost Development Trunk Cosmetic wontfix gcc warning