From 7d1bbc80d4978c128b8ebead42485d7a79624dcd Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Wed, 17 Jan 2024 07:07:48 +0100 Subject: [PATCH] Update for clang Clang also removed K&R support so define IMPLICIT_INT. Fix clang warning in lib/bt-log.c --- lib/bt-log.c | 2 +- tests/tcctest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bt-log.c b/lib/bt-log.c index bff9a794..aaa47ee5 100644 --- a/lib/bt-log.c +++ b/lib/bt-log.c @@ -39,7 +39,7 @@ DLL_EXPORT int tcc_backtrace(const char *fmt, ...) va_start(ap, fmt); ret = vfprintf(stderr, fmt, ap); va_end(ap); - fprintf(stderr, nl), fflush(stderr); + fprintf(stderr, "%s", nl), fflush(stderr); } return ret; } diff --git a/tests/tcctest.c b/tests/tcctest.c index bcf15bcf..b81cf5a7 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -341,7 +341,7 @@ static struct recursive_macro { int rm_field; } G; WRAP((printf("rm_field = %d %d\n", rm_field, WRAP(rm_field)))); } -#if !defined(__TINYC__) && (__GNUC__ >= 14) +#if !defined(__TINYC__) && (__GNUC__ >= 14 || __clang_major__ >= 15) #define IMPLICIT_INT int #else #define IMPLICIT_INT