<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59176>59176</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang forbids empty return in non-void function for C89
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Humm42
</td>
</tr>
</table>
<pre>
In C89, non-void functions may have empty return statements.
```
$ cat a.c
f(){return;}
$ clang -c -std=c89 a.c
a.c:1:5: error: non-void function 'f' should return a value [-Wreturn-type]
f(){return;}
^
1 error generated.
```
https://godbolt.org/z/G361PK41r
See also [the same issue on `Bugzille](https://bugs.llvm.org/show_bug.cgi?id=12216).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFUk-PnCAU_zR4IRoBwfHgYWdnd9v00qSHHhvEp9IgTABnM_vpizrt7rab1PDkvSfw-4Od66_tZ4vvDw2i99g6m1-c7vGwWBW1swHP8ooneQEM8zlesYe4eItDlBFmsDEUqDyh8u72FuVt7CWtsJIRy0LtjQHRA6INqo_7OYgdUX16s9hIO-Jc4TzEHrGTOjSvm9eE3ZEUPAUG751fk39IY0TrhFTjMLnF9L85S3yRZgGM-DH_vvfyeD0D4qf_s8PpQfxhL8gOjkew4JMRffGh_CnGc0gMEX1MY3R950wsnB9T9ZLiiQny9UtF_FsLvwFgaYJbacYJcJAzYB1CIr4qE-VxGV-0MRtteniP0S1jKIy5zDeUZMDzj9Qs1KgRe9Srp4RSIpLMIoOWCNFQ1pSiyvqW9Q1rZBZ1NNDuNzE43-k-vL97bT-wPK1cf6Js8ab9S7eO09IVys2pWLndpvzs3U9QMZWbvJAS3pBaZFOrGHBWDTAI2nPBBzJQXteMc14rKkFlRnZgQps8QpRaeN4dSnlyJdMtLZNIQhkljJRVAU1ZKjoIMUjK6pKgqoRZavPHqsy3G6XVv_TR6BBffcxkCHq0ABtcOl8ucXK-_bTMc0WzDbndmP8CBHf_vw">