struct data { int type; union { int i; char *c; } value; }; int the_function(int argc, struct data *argv) { .... }