How to force gcc to do printf checks on non-literal format strings?
const char* const non_literal_string = "Hello %d"; void my_print() { /* * I would like GCC to throw a warning when compiling this line because the * argument is not of int type. */ printf(non_literal_string, "World!"); //Like it does here printf("Hello %d", "World!"); } Above I have declared non_literal_string as const char* const so neither