History

Update for clang

Clang also removed K&R support so define IMPLICIT_INT. Fix clang warning in lib/bt-log.c

herman ten brugge committed 2 years ago

Commit 7d1bbc81 parent 0059d892 files · +2 −2Browse files

Unified · Split

2 files
  1. lib/bt-log.c +1 −1
  2. tests/tcctest.c +1 −1
lib/bt-log.c+1−1
@@ -39,7 +39,7 @@ DLL_EXPORT int tcc_backtrace(const char *fmt, ...) · 38 unmodified lines
3939 va_start(ap, fmt);
4040 ret = vfprintf(stderr, fmt, ap);
4141 va_end(ap);
42− fprintf(stderr, nl), fflush(stderr);
42+ fprintf(stderr, "%s", nl), fflush(stderr);
4343 }
4444 return ret;
4545 }
tests/tcctest.c+1−1
@@ -341,7 +341,7 @@ static struct recursive_macro { int rm_field; } G; · 340 unmodified lines
341341 WRAP((printf("rm_field = %d %d\n", rm_field, WRAP(rm_field))));
342342 }
343343
344−#if !defined(__TINYC__) && (__GNUC__ >= 14)
344+#if !defined(__TINYC__) && (__GNUC__ >= 14 || __clang_major__ >= 15)
345345 #define IMPLICIT_INT int
346346 #else
347347 #define IMPLICIT_INT

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t