File: struct.c

package info (click to toggle)
sdcc 3.8.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 99,212 kB
  • sloc: ansic: 918,594; cpp: 69,526; makefile: 56,790; sh: 29,616; asm: 12,364; perl: 12,136; yacc: 7,179; lisp: 1,672; python: 812; lex: 773; awk: 495; sed: 89
file content (104 lines) | stat: -rw-r--r-- 1,214 bytes parent folder | download | duplicates (10)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

#ifdef TEST1
struct tag {
  int good1;
  register int bad;	/* ERROR */
  int good2;
} badstruct;		/* IGNORE */
#endif

#ifdef TEST2
struct tag {
  int good1;
  int bad;	/* IGNORE */
  int bad;	/* ERROR */
  int good2;
} badstruct;
#endif


#ifdef TEST3
struct tag {
  int good1;
  int bad:255;	/* ERROR */
  int good2;
} badstruct;
#endif

#ifdef TEST4
struct tag {
  int good1;
  int good2;
} goodstruct1;

struct tag goodstruct2;
#endif

#ifdef TEST5a
struct tag {
  int good1;
  int good2;
} goodstruct1;

union tag badunion;	/* ERROR */
#endif

#ifdef TEST5b
union tag {
  int good1;
  int good2;
} goodunion1;

struct tag badstruct;	/* ERROR */
#endif


#ifdef TEST6
struct linklist {
  struct linklist *prev;
  struct linklist *next;
  int x;
} ll;
#endif

#ifdef TEST7a
union tag {
  struct tag *next;	/* ERROR */
  int x;
} ll;
#endif

#ifdef TEST7b
struct tag {
  union tag *next;	/* ERROR */
  int x;
} ll;
#endif

#ifdef TEST8a
struct tag {
  int a;		/* IGNORE */
  struct {
    int a;		/* ERROR(SDCC) */ /* IGNORE(GCC) */
    int b;
  };
} ll;  
#endif

#ifdef TEST8b
struct tag {
  int a;
  struct {
    int b;
    int c;
  };
} ll;  

void test(void)
{
  ll.a = 1;
  ll.b = 2;
  ll.c = 3;
}

#endif