-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathobject1.c
46 lines (37 loc) · 901 Bytes
/
object1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <stddef.h>
int a1; // COMPLIANT
int a2; // COMPLIANT
long a3; // NON_COMPLIANT
long a4; // NON_COMPLIANT
int a5; // NON_COMPLIANT
long a6; // NON_COMPLIANT
int a7; // NON_COMPLIANT
int a8; // COMPLIANT
extern int a8; // COMPLIANT
int a9[100]; // COMPLIANT
int a10[100]; // NON_COMPLIANT
int a11[100]; // NON_COMPLIANT - different sizes
int a12; // COMPLIANT
int *const a13; // NON_COMPLIANT
struct NamedStruct0 {
int val[10];
size_t size; // NON_COMPLIANT - different type
} s0; // NON_COMPLIANT - different member type
struct NamedStruct1 {
int val[10];
size_t size;
} s1; // NON_COMPLIANT - different member name
struct {
int val[10];
size_t size;
} s2; // COMPLIANT
struct OuterStruct {
struct {
int val[10]; // COMPLIANT
size_t size;
} firstArray;
struct {
int val[10][2]; // COMPLIANT
size_t size;
} secondArray;
};