We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cec13d commit 00cbad7Copy full SHA for 00cbad7
regression/cbmc/va_list3/main.c
@@ -0,0 +1,29 @@
1
+#include <stdio.h>
2
+#include <stdarg.h>
3
+#include <assert.h>
4
+
5
+void foo(int n, ...);
6
7
+int main()
8
+{
9
+ foo(1, 1u);
10
+ foo(2, 2l);
11
+ foo(3, 3.0);
12
+ return 0;
13
+}
14
15
+void foo(int n, ...)
16
17
+ va_list vl;
18
19
+ va_start(vl,n);
20
21
+ switch(n)
22
+ {
23
+ case 1: assert(va_arg(vl, unsigned)==1); break;
24
+ case 2: assert(va_arg(vl, long)==2); break;
25
+ case 3: assert(va_arg(vl, double)==3.0); break;
26
+ }
27
28
+ va_end(vl);
29
regression/cbmc/va_list3/test.desc
@@ -0,0 +1,8 @@
+KNOWNBUG
+main.c
+^EXIT=0$
+^SIGNAL=0$
+^VERIFICATION SUCCESSFUL$
+--
+^warning: ignoring
0 commit comments