mirror of
https://github.com/ziglang/zig.git
synced 2024-12-04 02:48:50 +00:00
4307436b99
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
19 lines
400 B
C
19 lines
400 B
C
// initializer list expression
|
|
typedef struct Color {
|
|
unsigned char r;
|
|
unsigned char g;
|
|
unsigned char b;
|
|
unsigned char a;
|
|
} Color;
|
|
#define CLITERAL(type) (type)
|
|
#define LIGHTGRAY CLITERAL(Color){ 200, 200, 200, 255 } // Light Gray
|
|
|
|
#define MY_SIZEOF(x) ((int)sizeof(x))
|
|
#define MY_SIZEOF2(x) ((int)sizeof x)
|
|
|
|
struct Foo {
|
|
int a;
|
|
};
|
|
|
|
#define SIZE_OF_FOO sizeof(struct Foo)
|