aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-06-18 11:08:19 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-06-18 11:15:28 +0100
commit92edc4a7684cdad5d30e197b976c35b2257f7bed (patch)
tree27d39642961de09af6e4215d50fff2654f621eed /gcc
parent76e990fd211cbb20bf74ce074eb8b2d7b096d3b7 (diff)
downloadgcc-92edc4a7684cdad5d30e197b976c35b2257f7bed.zip
gcc-92edc4a7684cdad5d30e197b976c35b2257f7bed.tar.gz
gcc-92edc4a7684cdad5d30e197b976c35b2257f7bed.tar.bz2
libstdc++: Suppress -Wstringop-overread warning in test
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>
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions