summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/string1.C
blob: 2670f63d931be2cde6483956efc0d1613c2ce056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/35652
// { dg-options "-O" }

#include <string>
int test() {
  // blank line padding, could also be code...
  //
  //
  //
  //
  //
  //
  //
  //
  //
  std::string s = "";
  s += 'x' + "y";	      // { dg-warning "bounds of constant string" }
}