On 2024-09-30 09:44:33 +0100, Jonathan Wakely via cfarm-users wrote: > On Sun, 29 Sept 2024 at 23:06, Jonathan Wakely wrote: > > Well the code has undefined behaviour, which is definitely not portable. > > > > Doesn't UBsan diagnose this mistake? > > UBsan doesn't diagnose it, but the code crashes for me with *every* > version of GCC I tried, from GCC 6.1 onwards. It's not a problem with > GCC 14, it's just broken code. Nothing to see here, move along.
I suppose that UBsan cannot diagnose UB related to incorrect types because the information is not stored. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ cfarm-users mailing list cfarm-users@lists.tetaneutral.net https://lists.tetaneutral.net/listinfo/cfarm-users