[vlc-devel] [PATCH 0/5] cpp: renaming all *sys_t because of ODR

Steve Lhomme robux4 at ycbcr.xyz
Tue Mar 13 09:21:53 CET 2018


Le 08/03/2018 à 11:42, Thomas Guillem a écrit :
> A better solution for 4.0 only is to remove all sys_t typedef and add an anynomous namespace for sys_t structs in all cpp modules. That is a only 3 liners per module.
>
> namespace
> {
> struct demux_sys_t
> {
> ...
> };
> }

Yes please. void* is not a good solution IMO. Only bound to have 
mismatches and confusion on what should be used. It's better to let the 
compiler tell you when you're doing something wrong.

Can't this be used for 3.0 too ?

> For 3.0, we should rename spatialaudio and chromecast sys_t (the 2 last ones). Not a perfect solution, but should avoid most issues.
>
> On Thu, Mar 8, 2018, at 10:14, Thomas Guillem wrote:
>>
>> On Wed, Mar 7, 2018, at 18:48, Rémi Denis-Courmont wrote:
>>> Le keskiviikkona 7. maaliskuuta 2018, 19.23.59 EET Thomas Guillem a écrit :
>>>>> In theory, yes. That is why we decided not to enable LTO by default
>>>>> several
>>>>> months ago. You are late to the party if you want to fix this for 3.0.
>>>> Why not ?
>>>> Just renaming few structs in few modules is not that complicated.
>>> I doubt that those few structs are the only remaining ODR violations,
>>> especially if you link statically.
>> linking a -O0 vlc static build with clang++ and -Wl,-detect-odr-
>> violations give me the following ODR violations:
>> https://paste.gnome.org/p90uxef4l
>>
>> So there is an identified problem with chromecast, mkv, blend,
>> spatialaudio and taglib.
>>
>> Maybe, there are more ODR issues. Nevertheless, we should rename these
>> modules and backport to 3.0. Especially since the want the 3.0 to be a
>> LTS.
>>
>> I'll try again with all cpp contribs built with -O0
>>
>>
>>> -- 
>>> 雷米‧德尼-库尔蒙
>>> https://www.remlab.net/
>>>
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list