if (!parser_next(parser))
parseerror(parser, "parse error");
if (expected->expression.next->expression.vtype != TYPE_VOID) {
- parseerror(parser, "return without value");
+ if (opts_standard != COMPILER_GMQCC)
+ parsewarning(parser, WARN_MISSING_RETURN_VALUES, "return without value");
+ else
+ parseerror(parser, "return without value");
}
ret = ast_return_new(parser_ctx(parser), NULL);
}
GMQCC_DEFINE_FLAG(UNKNOWN_CONTROL_SEQUENCE)
GMQCC_DEFINE_FLAG(EXTENSIONS)
GMQCC_DEFINE_FLAG(FIELD_REDECLARED)
+GMQCC_DEFINE_FLAG(MISSING_RETURN_VALUES)