Re:Tell HN: C Experts Panel – Ask us anything about C
by epr on Wednesday April 15, 2020 @09:30AM
(#22877447)
I don't think that's undefined behavior. That's how C's limited form of polymorphism is utilized. For example, many data structures behind dynamic languages are implemented in this way. A concrete example would be Python's PyObject which share PyObject_HEAD.
https://github.com/python/cpython/blob/master/Include/object...