This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/65101] cppcheck for vector.tcc: Variable '__new_finish' is reassigned a value before the old one has been used.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Feb 2015 09:56:20 +0000
- Subject: [Bug libstdc++/65101] cppcheck for vector.tcc: Variable '__new_finish' is reassigned a value before the old one has been used.
- Auto-submitted: auto-generated
- References: <bug-65101-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65101
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
cppcheck is wrong. If the std::__uninitialized_move_if_noexcept_a operation
throws an exception then __new_finish doesn't get a new value and is left
value-initialized, which is checked for in the catch clause.