#include #include typedef enum { A = 0xaa } __attribute__((__packed__)) MyType; static void func(char *first_name, ...) { char *name = first_name; va_list args; va_start (args, first_name); while (name) { int* value = va_arg (args, int*); *value = A; name = va_arg (args, char*); } } int main(void) { g_print ("sizeof: %d\n", sizeof (MyType)); MyType wert = 0; func ("a", &wert, NULL); g_print ("Wert: %d\n", wert); return 0; /* crashes on exit! */ } /* Conclusion: it is not safe to use pointers to enum types in varargs calls */