News for hackers. Stuff that matters.
Re:Structslop: Struct Alignment Analyzer for Go by GauntletWizard on Monday November 09, 2020 @07:19PM (#25041571)
This is fascinating... but I do believe there’s a reason that those fields are not re-arranged by the go compiler already, which is to preserve C ABI Compatibility. I doubt that’s worth it in most cases, though. Does it still preserve them in “pure” mode?
Re:Structslop: Struct Alignment Analyzer for Go by mhh__ on Monday November 09, 2020 @09:33PM (#25042320)
If the compiler rearranged the struct you'd just be asking for weird ABI bugs as the compiler changed.