3 ms·
> Also compilers from that era were less likely to exploit UB if at all No. Here's an LWN discussion of a CERT advisory in 2008 trying this nonsense, claiming
by tialaramex 5y ago
> Also compilers from that era were less likely to exploit UB if at all
No. Here's an LWN discussion of a CERT advisory in 2008 trying this nonsense, claiming it's a problem that GCC 4.2 elides futile late NULL checks. https://lwn.net/Articles/278137/ https://lwn.net/Articles/278137/
In fact several other compilers already had this optimisation, and CERT had to go back and revise the advisory because in practice all that's going on is, as now Real Programmers think their undefined program ought to do whatever it was they intended, and that's not how programming works.