mescc: Support void return.
* module/language/c99/compiler.mes (ast-info): Support `return'.
This commit is contained in:
parent
c64691797b
commit
ed3aa5be35
|
@ -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))))))
|
||||
|
|
Loading…
Reference in a new issue