tcc.c:main() free all & etc...

tcc.c:
- be nice to leak checkers
tcctools.c:
- remove unused TCCState params
tccrun.c:
- call bound_exit() after signals to let it free mem
tccelf.c:
- use section_add() instead of section_ptr_add() when
  more appropriate
tccpp.c:
- use size_t to align tal_header naturally
- 'POINTER_SIZE' and 'PTR_SIZE' in the same source is confusing
- "char file_name[TAL_DEBUG_FILE_LEN + 1];" looks silly.
- next_nomacro(): skip UTF8 BOM at BOF
tccgen.c:
- get rid of STMT_EXPR clause on top of block
- warn with useless type like 'int;'
- move skip()'s in block() for better error line-info
- BIT_SIZE bits are meaningful only with VT_BITFIELD
  (not with enums for example)
workflow/test-win32:
- build with MSVC using build-tcc.bat also
alloca.S:
- fix 'off by one' problem on win32 (must touch current page
  too because the 'push %edx' at the end could touch the next page)
- must not align greater than 4 when used for struct args
  (i386-gen.c:gfunc_call())
libtcc.c:
- accept -g1dwarf (dwarf output, only line info)
This commit is contained in:
grischka
2025-08-06 10:44:50 +02:00
parent 8845b6cd45
commit deb7a3fc73
17 changed files with 187 additions and 162 deletions

View File

@@ -54,7 +54,7 @@ static int ar_usage(int ret) {
return ret;
}
ST_FUNC int tcc_tool_ar(TCCState *s1, int argc, char **argv)
ST_FUNC int tcc_tool_ar(int argc, char **argv)
{
static const ArHdr arhdr_init = {
"/ ",
@@ -360,7 +360,7 @@ the_end:
#ifdef TCC_TARGET_PE
ST_FUNC int tcc_tool_impdef(TCCState *s1, int argc, char **argv)
ST_FUNC int tcc_tool_impdef(int argc, char **argv)
{
int ret, v, i;
char infile[260];
@@ -487,9 +487,9 @@ the_end:
#if !defined TCC_TARGET_I386 && !defined TCC_TARGET_X86_64
ST_FUNC int tcc_tool_cross(TCCState *s1, char **argv, int option)
ST_FUNC int tcc_tool_cross(char **argv, int option)
{
tcc_error_noabort("-m%d not implemented.", option);
fprintf(stderr, "tcc -m%d not implemented\n", option);
return 1;
}
@@ -546,7 +546,7 @@ static int execvp_win32(const char *prog, char **argv)
#define execvp execvp_win32
#endif /* _WIN32 */
ST_FUNC int tcc_tool_cross(TCCState *s1, char **argv, int target)
ST_FUNC int tcc_tool_cross(char **argv, int target)
{
char program[4096];
char *a0 = argv[0];
@@ -565,7 +565,7 @@ ST_FUNC int tcc_tool_cross(TCCState *s1, char **argv, int target)
if (strcmp(a0, program))
execvp(argv[0] = program, argv);
tcc_error_noabort("could not run '%s'", program);
fprintf(stderr, "tcc: could not run '%s'\n", program);
return 1;
}