PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wunused-var-27.C
blob0ef7153128430d2aeaee1240ae299f0d07fba551
1 // PR c++/82728
2 // { dg-do compile }
3 // { dg-options "-Wunused-but-set-variable" }
5 void
6 foo ()
8   const int i = 1;              // { dg-bogus "set but not used" }
9   switch (0)
10     {
11     case i:
12       break;
13     }