blob: 9eb5fb696be542181c613e30b2be2fc7fd3243fe [file] [log] [blame]
// PR c++/35652
// { dg-options "-O -Wall" }
#include <string>
int test() {
// blank line padding, could also be code...
//
//
//
//
//
//
//
//
//
std::string s = "";
s += 'x' + "y"; // { dg-warning "bounds of constant string" }
return 0;
}
// With -std=c++17 we get another warning deep under operator+=.
// { dg-prune-output __builtin_memcpy }