PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wformat-1.C
blobf2e772aec950a32dec221d9fc5defd8d61275794
1 // PR c++/64629
2 // { dg-options "-Wformat -Wformat-security" }
4 extern void bar (int, const char *, ...) __attribute__((format (printf, 2, 3)));
5 void
6 foo (void)
8   const char *const msg = "abc";
9   bar (1, msg);
10   bar (1, msg + 1);
11   bar (1, 1 + msg);