mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
20 lines
309 B
C
20 lines
309 B
C
// More extensive union with C99 style designator initialization behaviour using const expressions.
|
|
|
|
union A {
|
|
unsigned char b;
|
|
unsigned int w;
|
|
};
|
|
|
|
union B {
|
|
union A a;
|
|
char b[4];
|
|
};
|
|
|
|
union B b1 = { .a={ .b=1 } };
|
|
|
|
|
|
char* const SCREEN = (char*)0x0400;
|
|
|
|
void main() {
|
|
SCREEN[0] = b1.b[0];
|
|
} |