Debian Codegraph @

clang/test/C/C2y/n3482.c

raw
1 // RUN: %clang_cc1 -verify -std=c2y -Wall -pedantic -ffreestanding %s
2
3 /* WG14 N3482: Yes
4 * Slay Some Earthly Demons XVII
5 *
6 * This paper makes it a constraint violation to call va_start in a non-
7 * variadic function. This is something Clang has always diagnosed.
8 */
9
10 #include <stdarg.h>
11
12 void func(int a) {
13 va_list list;
14 va_start(list, a); // expected-error {{'va_start' used in function with fixed args}}
15 }