aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/va-arg-1.c
blob: a14823725daa5db792ad93735b0cd4eeb07b30e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */

#include <stdarg.h>

va_list v;
volatile int i;

void foo()
{
  i = va_arg(v, char); /* { dg-warning "is promoted to|so you should" "char" } */
  i = va_arg(v, short); /* { dg-warning "is promoted to" "short" } */
  i = va_arg(v, float); /* { dg-warning "is promoted to" "float" } */
}