id summary reporter owner description type status milestone component version severity resolution keywords cc 11640 scope_exit: -Wshadow warning issued lukasz.czajczyk@… Lorenzo Caminiti "Hi, BOOST_SCOPE_EXIT emits warning: declaration shadows a local variable [-Wshadow] in CLANG compiler. Tested with boost 1.54-1.58 and CLANG 3.5-3.7. The issue does not occur on GCC when boost is included using -isystem. Sample program: {{{ #!div style=""font-size: 80%"" Code highlighting: {{{#!c++ #include int main() { int i, j = 0; BOOST_SCOPE_EXIT(i, j) {} BOOST_SCOPE_EXIT_END return 0; } }}} }}} Compiled with clang++ -isystem /tmp/boost/boost_1_58_0 -Wshadow warning: declaration shadows a local variable [-Wshadow] BOOST_SCOPE_EXIT(i, j) ^ /tmp/boost/boost_1_58_0/boost/scope_exit.hpp:900:17: note: expanded from macro 'BOOST_SCOPE_EXIT' __VA_ARGS__) ^ /tmp/boost/boost_1_58_0/boost/scope_exit.hpp:893:59: note: expanded from macro 'BOOST_SCOPE_EXIT_ID' BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST(__VA_ARGS__))) ^ /tmp/boost/boost_1_58_0/boost/scope_exit.hpp:178:59: note: expanded from macro 'BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST' BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_VOID_BACK, __VA_ARGS__) ^ note: (skipping 66 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /tmp/boost/boost_1_58_0/boost/preprocessor/list/adt.hpp:35:63: note: expanded from macro 'BOOST_PP_LIST_FIRST_D' # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list ^ /tmp/boost/boost_1_58_0/boost/preprocessor/list/adt.hpp:40:44: note: expanded from macro 'BOOST_PP_LIST_FIRST_I' # define BOOST_PP_LIST_FIRST_I(head, tail) head ^ /tmp/boost/boost_1_58_0/boost/scope_exit.hpp:316:5: note: expanded from macro 'BOOST_SCOPE_EXIT_AUX_ARG_DECL' var ^ p.cxx:5:8: note: previous declaration is here int i, j = 0; ^ " Bugs new To Be Determined scope_exit Boost 1.58.0 Problem