mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-05 00:47:54 -04:00
1.4 KiB
1.4 KiB
§321 — FILE-SCOPE DUPLICATE ANONYMOUS-STRUCT TYPEDEFS ARE A HARD ERROR; THE SAME TEXT AT BLOCK SCOPE IS A WARNING (P31 S66; byte-proven func_80180728, func_8017F9F8, func_8017E07C)
THE TELL. conflicting types for 'D_xxxxxxxx' or a redefinition error naming a struct typedef,
where your draft's declaration is TEXTUALLY IDENTICAL to one already in the TU. Two anonymous struct
definitions are two DISTINCT types to gcc-2.7.2 even when spelled the same, so a file-scope
duplicate is fatal.
THE DIALS, all three byte-proven in one lane:
- Move the duplicate to BLOCK scope. A block-scope redeclaration of the same extern symbol is
only a warning here, and is codegen-neutral (
func_80180728, MATCH; verified both standalone and spliced viartu_match). - Or hoist to file scope and delete the local copy — the mirror move, when the TU's own
declaration already sits at file scope right before your INCLUDE_ASM slot (
func_8017F9F8, MATCH 117 ins, valid against BOTH ov_SC01_005 and its ov_SC01_006 twin). - Name a local typedef for its OWN address, never a neighbour's.
SVEC_8017E158belongs tofunc_8017E158; reusing that tag insidefunc_8017E07C's draft is a real two-anonymous-structs conflict once spliced. UseSVEC_<own addr>(func_8017E07C, MATCH).
Do not reach for a cast-at-use here — the shape already matches; the conflict is type IDENTITY, not type WIDTH.