2026-02-19 11:08:20 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
2026-02-19 11:11:23 +00:00
|
|
|
typedef struct T {
|
|
|
|
|
bool a;
|
|
|
|
|
uint8_t b;
|
|
|
|
|
} T;
|
|
|
|
|
|
|
|
|
|
typedef uint8_t Shape_Tag;
|
|
|
|
|
#define Circle 0
|
|
|
|
|
#define Rectangle 1
|
|
|
|
|
|
|
|
|
|
typedef struct Circle_Body {
|
|
|
|
|
double radius;
|
|
|
|
|
} Circle_Body;
|
|
|
|
|
|
|
|
|
|
typedef struct Rectangle_Body {
|
|
|
|
|
double width;
|
|
|
|
|
double height;
|
|
|
|
|
} Rectangle_Body;
|
|
|
|
|
|
|
|
|
|
typedef struct Shape {
|
|
|
|
|
Shape_Tag tag;
|
|
|
|
|
union {
|
|
|
|
|
Circle_Body circle;
|
|
|
|
|
Rectangle_Body rectangle;
|
|
|
|
|
} body;
|
|
|
|
|
} Shape;
|
|
|
|
|
|
2026-02-19 11:08:20 +00:00
|
|
|
void hello(const char *c);
|
2026-02-19 11:11:23 +00:00
|
|
|
|
2026-02-19 11:15:38 +00:00
|
|
|
void hello_struct(struct T t);
|
2026-02-19 11:11:23 +00:00
|
|
|
|
2026-02-19 11:15:38 +00:00
|
|
|
void hello_shape(struct Shape s);
|
2026-02-19 15:26:27 +00:00
|
|
|
|
2026-02-19 15:56:55 +00:00
|
|
|
__attribute__((const)) int64_t add(int64_t a, int64_t b);
|