Last change
on this file since 2442 was 322, checked in by bird, 22 years ago |
Early coding. (small union/struct testcases)
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
505 bytes
|
Line | |
---|
1 | /* Minimal testcase for union in struct.
|
---|
2 | * In C++ mode the following result:
|
---|
3 | * Works in idebug (VAC365 fp2)
|
---|
4 | * Works not in icsdebug (VAC308)
|
---|
5 | * Works not in idbug (JIT)
|
---|
6 | *
|
---|
7 | * The pNext pointers used to be a problem too.
|
---|
8 | */
|
---|
9 | union u
|
---|
10 | {
|
---|
11 | char * pch;
|
---|
12 | int i;
|
---|
13 | union u *pNext;
|
---|
14 | };
|
---|
15 |
|
---|
16 | struct s
|
---|
17 | {
|
---|
18 | int tag;
|
---|
19 | union u d;
|
---|
20 | struct s * pNext;
|
---|
21 | };
|
---|
22 |
|
---|
23 | int main(void)
|
---|
24 | {
|
---|
25 | union u un;
|
---|
26 | struct s st;
|
---|
27 | un.pch = "";
|
---|
28 | un.i = 1;
|
---|
29 | st.tag = 2;
|
---|
30 | st.d = un;
|
---|
31 | return 0;
|
---|
32 | }
|
---|
33 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.