C11 has type generic macros. You can build your own with the _Generic statement.
int maxi(int, int);
double: maxd(double, double);
...
#define max(x) _Generic((x), int: maxi, double: maxd, ...default: maxi)