Maybe its just a dumb question but I was wondering if there is a way to allow two data types in the same function parameter, sort of polimorphism that in the end does the same stuff, just to filter out some garbage input.
typedef enum
{
} type1_t;
typedef enum
{
} type2_t;
void myfunc(typex_t foo)
{
}