mescc: Support void return.

* module/language/c99/compiler.mes (ast-info): Support `return'.
This commit is contained in:
Jan Nieuwenhuizen 2017-05-08 20:06:20 +02:00
parent c64691797b
commit ed3aa5be35
1 changed files with 3 additions and 1 deletions

View File

@ -1221,7 +1221,6 @@
(1+ (local:id (cdar locals)))))
(locals (cons (make-local name type pointer id) locals)))
locals))
(pmatch o
(((trans-unit . _) . _)
((ast-list->info info) o))
@ -1454,6 +1453,9 @@
(list (lambda (f g ta t d)
(jump (- (label-offset (.function info) label f) offset))))))))
((return (expr))
(append-text info (append (wrap-as (i386:ret)))))
((return ,expr)
(let ((info ((expr->accu info) expr)))
(append-text info (append (wrap-as (i386:ret))))))