|
|
|
|
|
by epr
2249 days ago
|
|
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... |
|