cgen: fix VUNREACHABLE on freebsd/tcc

pull/10962/head
Alexander Medvednikov 2021-07-25 16:29:05 +03:00
parent ab20b8c53a
commit e246ed9818
2 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,7 @@ fn exec(s string) string {
fn measure(cmd string, description string) int {
println(' Measuring $description')
println(' Warming up...')
println(cmd)
for _ in 0 .. 3 {
exec(cmd)
}

View File

@ -200,6 +200,9 @@ const c_common_macros = '
#ifndef VUNREACHABLE
#define VUNREACHABLE() do { } while (0)
#endif
#if defined(__FreeBSD__) && defined(__TINYC__)
#define VUNREACHABLE() do { } while (0)
#endif
#endif
//likely and unlikely macros