[vlc-devel] [PATCH] Embed vlc_object_t for subtyping (strict aliasing)
remi at remlab.net
Sun Jun 10 20:26:04 CEST 2018
Le sunnuntaina 10. kesäkuuta 2018, 20.34.40 EEST Romain Vimont a écrit :
> With strict aliasing enabled, it is undefined to access a field after a
> cast to an unrelated type, even if both types declare the same field.
Nevertheless the minimalistic type safety of VLC_OBJECT() has saved many asses
many times, and I don't want to ditch it without a replacement that is not at
least as safe. So not a plain dumb unchecked cast.
More information about the vlc-devel