there's no need to emit unreferenced static function, even if they are forced.
Unified · Split
| @@ -7422,9 +7422,9 @@ static void gen_inline_functions(TCCState *s) · 7421 unmodified lines | |||
| 7422 | for (i = 0; i < s->nb_inline_fns; ++i) { | 7422 | for (i = 0; i < s->nb_inline_fns; ++i) { |
| 7423 | fn = s->inline_fns[i]; | 7423 | fn = s->inline_fns[i]; |
| 7424 | sym = fn->sym; | 7424 | sym = fn->sym; |
| 7425 | if (sym && (sym->c || !(sym->type.t & VT_INLINE) )){ | 7425 | if (sym && (sym->c || !(sym->type.t & (VT_INLINE | VT_STATIC)) )) { |
| 7426 | /* the function was used or forced: generate its code and | 7426 | /* the function was used or forced (and then not internal): |
| 7427 | convert it to a normal function */ | 7427 | generate its code and convert it to a normal function */ |
| 7428 | fn->sym = NULL; | 7428 | fn->sym = NULL; |
| 7429 | if (file) | 7429 | if (file) |
| 7430 | pstrcpy(file->filename, sizeof file->filename, fn->filename); | 7430 | pstrcpy(file->filename, sizeof file->filename, fn->filename); |