On Friday, 17 July 2020 23:32:41 PDT Simon Hausmann wrote: > This hack has been in QtQml in production since its release in 2010 (see > static cast selector). > > It would be a shame if this stopped working
The problem here is the damage that can happen if a breakage happens. If the QtQml code is happening behind the scenes and we can change it when an issue is detected, any damage is contained. We can also disable it when UBSan is active. I am perfectly willing to take UB where it's contained like that. I am not willing to take it when it is in everyone's code, like in macros or with moc-generated code. We need to be compatible with all compilers from 2019 to 2030, with 9 of those 11 years not yet come to pass. This needs to have a non-UB solution. The UB one can be a special optimisation, which we carefully enable where we know it works. So what's the non-UB solution? -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel System Software Products _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development