956077257a
When compiled with -m32 -O2 -D_GLIBCXX_USE_CXX11_ABI=0 we get a warning
for 21_strings/basic_string/cons/char/1.cc:
bits/char_traits.h:409:56: warning: ‘void* __builtin_memcpy(void*, const void*, unsigned int)’ reading 1073741821 bytes from a region of size 19 [-Wstringop-overread]
The warning is legitimate, even if that line cannot be reached because
we throw std::length_error before getting there. Since the invalid
length is deliberate (and mentioned in a comment) just suppress the
warning, so that the test can verify we get the exception.
Also remove an unused typedef that produces another warning.
libstdc++-v3/ChangeLog:
* testsuite/21_strings/basic_string/cons/char/1.cc: Use
diagnostic pragma to suppress -Wstringop-overread error.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
allocator | ||
capacity | ||
cons | ||
debug | ||
element_access | ||
hash | ||
inserters_extractors | ||
literals | ||
modifiers | ||
numeric_conversions | ||
operations | ||
operators | ||
range_access | ||
requirements | ||
types | ||
40160.cc | ||
56166.cc | ||
79162.cc | ||
dr2268.cc | ||
erasure.cc | ||
init-list.cc | ||
lwg2758.cc | ||
lwg2946.cc | ||
pthread4.cc | ||
pthread18185.cc | ||
pthread33394.cc |