#include <stdio.h>
#define auto __auto_type
#define overload __attribute__((overloadable))
#define ms_abi __attribute__((ms_abi))
#define packed __attribute__((packed))
typedef enum packed {
apple = 300,
} Thing;
overload
void foo(int a) {
printf("int: %i\n", a);
}
overload
void foo(double a) {
printf("double: %g\n", a);
}
overload
void foo(char *a) {
printf("char *: %s\n", a);
}
int main(void) {
auto a = 3.05;
auto b = 3;
foo(a);
foo(b);
foo("hello");
foo((int)sizeof(Thing));
return 0;
}