[vlc-devel] [PATCH] Embed vlc_object_t for subtyping (strict aliasing)
Rémi Denis-Courmont
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.
True.
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.
--
雷米‧德尼-库尔蒙
http://www.remlab.net/
More information about the vlc-devel
mailing list