From aec0c9eea14907e7b1b1fbe49cb6fca7956475fe Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 13 Dec 2002 23:05:24 +0000 Subject: [PATCH] make return type missmatch a warning for --traditional --- tools/qfcc/source/expr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index ea4e24e3b..5345b8280 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -1941,9 +1941,13 @@ return_expr (function_t *f, expr_t *e) t = f->def->type->aux_type; e->type = expr_types[t->type]; } - if (!type_assignable (f->def->type->aux_type, t)) - return error (e, "type mismatch for return value of %s", - f->def->name); + if (!type_assignable (f->def->type->aux_type, t)) { + if (!options.traditional) + return error (e, "type mismatch for return value of %s", + f->def->name); + warning (e, "type mismatch for return value of %s", + f->def->name); + } } return new_unary_expr ('r', e); }