Handle unsigned constants for module I/O.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / va-arg-5.c
bloba908f33b847e86db6cc1adaa20a0482944800e61
1 #include <stdarg.h>
3 void abort (void);
4 void exit (int);
6 void
7 va_double (int n, ...)
9 va_list args;
11 va_start (args, n);
13 if (va_arg (args, double) != 3.141592)
14 abort ();
15 if (va_arg (args, double) != 2.71827)
16 abort ();
17 if (va_arg (args, double) != 2.2360679)
18 abort ();
19 if (va_arg (args, double) != 2.1474836)
20 abort ();
22 va_end (args);
25 void
26 va_long_double (int n, ...)
28 va_list args;
30 va_start (args, n);
32 if (va_arg (args, long double) != 3.141592L)
33 abort ();
34 if (va_arg (args, long double) != 2.71827L)
35 abort ();
36 if (va_arg (args, long double) != 2.2360679L)
37 abort ();
38 if (va_arg (args, long double) != 2.1474836L)
39 abort ();
41 va_end (args);
44 int
45 main (void)
47 va_double (4, 3.141592, 2.71827, 2.2360679, 2.1474836);
48 va_long_double (4, 3.141592L, 2.71827L, 2.2360679L, 2.1474836L);
49 exit (0);