param_key: fix container of when no struct member is referenced
[smatch.git] / validation / typediff-enum.c
blobc5f2dc0a3f8bdf2a3098aa00cdc27e112df94df3
1 enum num { ZERO, ONE, MANY, };
2 typedef enum num num;
4 extern int v;
5 num v = 0;
7 extern num w;
8 int w = 0;
10 int foo(void);
11 num foo(void) { return ZERO; }
13 num bar(void);
14 int bar(void) { return ZERO; }
16 void baz(int a);
17 void baz(num a) { }
19 void qux(num a);
20 void qux(int a) { }
23 * check-name: typediff-enum
24 * check-known-to-fail
26 * check-error-start
27 typediff-enum.c:5:5: error: symbol 'v' redeclared with different type (originally declared at typediff-enum.c:4) - different types
28 typediff-enum.c:8:5: error: symbol 'w' redeclared with different type (originally declared at typediff-enum.c:7) - different types
29 typediff-enum.c:11:5: error: symbol 'foo' redeclared with different type (originally declared at typediff-enum.c:10) - different types
30 typediff-enum.c:14:5: error: symbol 'bar' redeclared with different type (originally declared at typediff-enum.c:13) - different types
31 typediff-enum.c:17:6: error: symbol 'baz' redeclared with different type (originally declared at typediff-enum.c:16) - incompatible argument 1 (different types)
32 typediff-enum.c:20:6: error: symbol 'qux' redeclared with different type (originally declared at typediff-enum.c:19) - incompatible argument 1 (different types)
33 * check-error-end