projects
/
fw
/
sdcc
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr, createIval): imple...
[fw/sdcc]
/
support
/
valdiag
/
tests
/
typedef.c
1
2
#ifdef TEST1
3
typedef union {
4
long l;
5
float f;
6
} floatlong;
7
8
char func(char floatlong)
9
{
10
return floatlong;
11
}
12
#endif
13
14
#ifdef TEST2
15
typedef union {
16
long l;
17
float f;
18
} floatlong;
19
20
long func(float x)
21
{
22
typedef union {
23
float f2;
24
long l2;
25
char c[4];
26
} floatlong;
27
floatlong fl;
28
29
fl.f2=x;
30
return fl.l2;
31
}
32
#endif
33
34
#ifdef TEST3
35
typedef int I; /* IGNORE */
36
typedef int I; /* ERROR */
37
#endif
38
39
#ifdef TEST4
40
typedef int I; /* IGNORE */
41
typedef char I; /* ERROR */
42
#endif
43