Commit 8b1db3b
committed
cgen: emit forward typedefs for struct types used in C extern function signatures
When -skip_unused is active, struct types referenced only in extern function
declarations may not get their typedefs emitted, causing 'unknown type name'
errors in the generated C. This restores the forward-declaration logic that
was removed in 43fdf0f, ensuring types like main__Iwad_t are typedef'd
before the extern prototypes that reference them (fixes C2V apps CI).1 parent 4c44e6d commit 8b1db3b
1 file changed
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
678 | 716 | | |
679 | 717 | | |
680 | 718 | | |
| |||
837 | 875 | | |
838 | 876 | | |
839 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
840 | 881 | | |
841 | 882 | | |
842 | 883 | | |
| |||
0 commit comments