From 3db037387c16c7e582f76167d32d5c29ac32fb15 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Tue, 18 Oct 2016 03:38:59 +0200 Subject: [PATCH] libtcc1: Don't use stdlib functions libtcc1 is the compiler support library and therefore needs to function in a freestanding environment. In particular it can't just use fprintf or stderr, which it was on x86-64 (but only when compiled by GCC). The tight integration between libtcc1 and tcc itself makes it impossible to ever reach that case so the abort() there is enough. abort() is strictly speaking also not available in a freestanding environment, but it often is nevertheless. --- lib/libtcc1.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libtcc1.c b/lib/libtcc1.c index 3b6d618..c3ff7fe 100644 --- a/lib/libtcc1.c +++ b/lib/libtcc1.c @@ -700,9 +700,6 @@ void *__va_arg(__va_list_struct *ap, return ap->overflow_arg_area - size; default: /* should never happen */ -#ifndef __TINYC__ - fprintf(stderr, "unknown ABI type for __va_arg\n"); -#endif abort(); } }