comparison gcc/testsuite/gcc.dg/Wcxx-compat-11.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
3
4 #include <stdarg.h>
5
6 enum E { A };
7
8 extern void f2 (int);
9 void
10 f1 (int n, ...)
11 {
12 va_list ap;
13
14 va_start (ap, n);
15 f2 (va_arg (ap, int));
16 f2 (va_arg (ap, _Bool)); /* { dg-warning "promoted" } */
17 f2 (va_arg (ap, enum E)); /* { dg-warning "promoted" } */
18 }
19
20 /* Match extra informative notes. */
21 /* { dg-message "note:" "expected" { target *-*-* } 0 } */