Obsolete C for you and me
Obsolete C for you and me
Posted Dec 12, 2023 21:22 UTC (Tue) by mathstuf (subscriber, #69389)In reply to: Obsolete C for you and me by farnz
Parent article: Modern C for Fedora (and the world)
Or, if you've been relying on UB, the compiler turns out to be extra-capable of "changing the plan on-the-fly". But this is also because compilers take the source code as gospel and its "reality" is just some abstract fantasy machine.
And compilers do communicate through warnings and diagnostics all the time, but we're all too willing to ignore them at times.
Posted Dec 12, 2023 21:27 UTC (Tue)
by farnz (subscriber, #17727)
[Link]
Oh, the compiler can change the plan all right - it just can't do so to reflect the reality on the ground (since that requires intelligence spotting that the programmer "meant" this, but wrote that), but instead to reflect its understanding of what you wrote, even if that's not what you intended to write.
Obsolete C for you and me