Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/stdarg-lto-1-a.c

raw
1 /* { dg-do link } */
2 /* { dg-require-effective-target lto } */
3 /* { dg-additional-options "-flto" } */
4 /* { dg-additional-sources stdarg-lto-1-b.c } */
5
6 #include <stdarg.h>
7 #include "stdarg-lto-1.h"
8
9 /* Type mismatch: expect const char *, but passed an int. */
10
11 void
12 called_by_test_type_mismatch_1 (int placeholder, ...)
13 {
14 const char *str;
15
16 va_list ap;
17 va_start (ap, placeholder);
18
19 str = va_arg (ap, const char *); /* { dg-warning "'va_arg' expected '\[^\n\r\]*' but received 'int' for variadic argument 1 of 'ap'" } */
20
21 va_end (ap);
22 }
23
24 int main() { return 0; }