Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tree-ssa/pr79448-2.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* PR middle-end/79448 - unhelpful -Wformat-truncation=2 warning |
2 Verify that there's no warning with optimization. | |
3 { dg-do compile } | |
4 { dg-options "-O2 -Wall -Wformat -Wformat-truncation=2" } */ | |
5 | |
6 typedef __SIZE_TYPE__ size_t; | |
7 | |
8 extern int | |
9 snprintf (char*, size_t, const char*, ...); | |
10 | |
11 char* | |
12 gettext (char*); | |
13 | |
14 char* | |
15 fill (char *buf, size_t len, int count) | |
16 { | |
17 if (snprintf (buf, len, "%s: %d", gettext ("count"), count) >= len) /* { dg-bogus "directive output of 2 bytes causes result to exceed .INT_MAX." */ | |
18 return 0; | |
19 | |
20 return buf; | |
21 } |