r222073 - in /branches/google/gcc-4_9/libstdc++...

brooks@gcc.gnu.org brooks@gcc.gnu.org
Tue Apr 14 03:46:00 GMT 2015


Author: brooks
Date: Tue Apr 14 03:46:27 2015
New Revision: 222073

URL: https://gcc.gnu.org/viewcvs?rev=222073&root=gcc&view=rev
Log:
Mark std::unique, std::remove_if and std::remove with __attribute__((warn_unused_result)).

The attributes are added in the bits/algorithmfwd.h, which is included by the 
main implementation file bits/stl_algo.h.

While it's possible in peculiar circumstances to use these functions correctly 
without checking their return values, it's not something that's likely to
happen in practice.

(This also caught a bug in Clang code upstream, fixed separately in r234221.)

Google refs b/18886543, b/18980409.

Modified:
    branches/google/gcc-4_9/libstdc++-v3/include/bits/algorithmfwd.h
    branches/google/gcc-4_9/libstdc++-v3/testsuite/25_algorithms/unique/11480.cc



More information about the Libstdc++-cvs mailing list