# Sema: restrict what can appear in a naked function · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2ba787e3038d8776599fb968b3ddec6b7a62a3f3)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2ba787e3038d8776599fb968b3ddec6b7a62a3f3

Requested commit: 2ba787e3038d8776599fb968b3ddec6b7a62a3f3

Commit: 2ba787e3038d8776599fb968b3ddec6b7a62a3f3

Tree: 967663a3f1226f48ac1405416f7bc002074430da

Author: Jacob Young

Committer: Jacob Young

## Message

```
Sema: restrict what can appear in a naked function

 * Disable runtime calls, since it is not possible to know the proper
   stack adjustment to follow the callee abi.
 * Disable runtime returns, since it is not possible to know where the
   return address is stored in general.
 * Allow implicit returns regardless of the return type, which allows
   naked functions with a non-void return type to be written.

```

## Parents

- [9831f272383a66392ebeadbc60d8176f44b3553c](https://git.cafe/gitcafe/zig/commit/9831f272383a66392ebeadbc60d8176f44b3553c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2ba787e3038d8776599fb968b3ddec6b7a62a3f3?format=markdown)
