irfun = global->constval.vfunc;
if (!irfun) {
+ irwarning(global->context, WARN_IMPLICIT_FUNCTION_POINTER,
+ "function `%s` has no body and in QC implicitly becomes a function-pointer", global->name);
/* this was a function pointer, don't generate code for those */
return true;
}
options_set(opts_warn, WARN_USED_UNINITIALIZED, true);
options_set(opts_warn, WARN_LOCAL_CONSTANTS, true);
options_set(opts_warn, WARN_VOID_VARIABLES, true);
+ options_set(opts_warn, WARN_IMPLICIT_FUNCTION_POINTER, true);
if (!options_parse(argc, argv)) {
return usage();
GMQCC_DEFINE_FLAG(LOCAL_SHADOWS)
GMQCC_DEFINE_FLAG(LOCAL_CONSTANTS)
GMQCC_DEFINE_FLAG(VOID_VARIABLES)
+GMQCC_DEFINE_FLAG(IMPLICIT_FUNCTION_POINTER)