repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wformat-1.C
blob
f2e772aec950a32dec221d9fc5defd8d61275794
1
// PR c++/64629
2
// { dg-options "-Wformat -Wformat-security" }
3
4
extern void bar (int, const char *, ...) __attribute__((format (printf, 2, 3)));
5
void
6
foo (void)
7
{
8
const char *const msg = "abc";
9
bar (1, msg);
10
bar (1, msg + 1);
11
bar (1, 1 + msg);
12
}