What's wrong with "char *p = malloc(10);" ? Function calls are not allowed in initializers for global or static variables.