Print this page
new smatch
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/validation/nested-declarator2.c
+++ new/usr/src/tools/smatch/src/validation/nested-declarator2.c
1 1 typedef int T;
2 2 extern void f1(int);
3 3 extern void f2(T);
4 4 static void (*f3)(int) = f2;
5 5 static void (*f4)(T) = f1;
6 6 extern void f5(void (int));
7 7 extern void f6(void (T));
8 8 static void z(int x)
9 9 {
10 10 int (T) = x;
11 11 f5(f2);
12 12 f6(f3);
13 13 }
14 14 static void f8();
15 15 static int (x) = 1;
16 16 static void w1(y)
17 17 int y;
18 18 {
19 19 x = y;
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
20 20 }
21 21 static void w2(int ());
22 22 static void w3(...);
23 23 static void f9(__attribute__((mode(DI))) T);
24 24 static void w4(int f(x,y));
25 25 static void bad1(__attribute__((mode(DI))) x);
26 26 static int (-bad2);
27 27 static void [2](*bad3);
28 28 /*
29 29 * check-name: more on handling of ( in direct-declarator
30 - * check-error-start:
30 + * check-error-start
31 31 nested-declarator2.c:17:1: warning: non-ANSI definition of function 'w1'
32 32 nested-declarator2.c:21:21: warning: non-ANSI function declaration of function '<noident>'
33 33 nested-declarator2.c:22:16: warning: variadic functions must have one named argument
34 34 nested-declarator2.c:24:21: warning: identifier list not in definition
35 35 nested-declarator2.c:25:45: error: don't know how to apply mode to incomplete type
36 36 nested-declarator2.c:26:13: error: Expected ) in nested declarator
37 37 nested-declarator2.c:26:13: error: got -
38 38 nested-declarator2.c:27:16: error: Expected ; at the end of type declaration
39 39 nested-declarator2.c:27:16: error: got (
40 - * check-error-end:
40 + * check-error-end
41 41 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX