diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index b85354517..fc5ce0ff0 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -1949,6 +1949,9 @@ return_expr (function_t *f, expr_t *e) t = &type_float; } if (t == &type_void) { + if (!options.traditional) + return error (e, "void value not ignored as it ought to be"); + warning (e, "void value not ignored as it ought to be"); t = f->def->type->aux_type; e->type = expr_types[t->type]; } diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index 2b679bba2..e4efd6960 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -1437,8 +1437,8 @@ keywordnamelist ; keywordname - : selector ':' { $$ = new_keywordarg ($1, 0); } - | ':' { $$ = new_keywordarg ("", 0); } + : selector ':' { $$ = new_keywordarg ($1, new_nil_expr ()); } + | ':' { $$ = new_keywordarg ("", new_nil_expr ()); } ; obj_string