Skip to content

Commit

Permalink
Update for clang
Browse files Browse the repository at this point in the history
Clang also removed K&R support so define IMPLICIT_INT.
Fix clang warning in lib/bt-log.c
  • Loading branch information
hermantb committed Jan 17, 2024
1 parent 0059d89 commit 7d1bbc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bt-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/tcctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d1bbc8

Please sign in to comment.