mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
-std=gmqcc now implies -Werror-missing-return-values; another hardcoded error removed
This commit is contained in:
parent
17951ac92c
commit
d8254cede0
2 changed files with 2 additions and 4 deletions
1
main.c
1
main.c
|
@ -164,6 +164,7 @@ static bool options_parse(int argc, char **argv) {
|
|||
opts_set(opts.flags, TRUE_EMPTY_STRINGS, true);
|
||||
opts_set(opts.flags, LOOP_LABELS, true);
|
||||
opts_set(opts.werror, WARN_INVALID_PARAMETER_COUNT, true);
|
||||
opts_set(opts.werror, WARN_MISSING_RETURN_VALUES, true);
|
||||
opts.standard = COMPILER_GMQCC;
|
||||
|
||||
} else if (!strcmp(argarg, "qcc")) {
|
||||
|
|
5
parser.c
5
parser.c
|
@ -2534,10 +2534,7 @@ static bool parse_return(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
if (!parser_next(parser))
|
||||
parseerror(parser, "parse error");
|
||||
if (expected->expression.next->expression.vtype != TYPE_VOID) {
|
||||
if (opts.standard != COMPILER_GMQCC)
|
||||
(void)!parsewarning(parser, WARN_MISSING_RETURN_VALUES, "return without value");
|
||||
else
|
||||
parseerror(parser, "return without value");
|
||||
(void)!parsewarning(parser, WARN_MISSING_RETURN_VALUES, "return without value");
|
||||
}
|
||||
ret = ast_return_new(ctx, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue