http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48816
Summary: possible pointless code in file cxx-pretty-print.c, line 2136 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: dcb...@hotmail.com I just ran the static analysis tool, cppcheck, over the source code of the latest 4.7 snapshot, 20110423, and it said [cxx-pretty-print.c:2136]: (style) Variable 'i' is assigned a value that is never used I've checked the code and I agree with cppcheck. Suggest remove pointless variable. I am not sure why the existing functionality for set-but-not-used variables in gcc didn't catch this one. Maybe this existing functionality might benefit from enhancement.