|
|
Subscribe / Log in / New account

Obsolete C for you and me

Obsolete C for you and me

Posted Dec 11, 2023 17:33 UTC (Mon) by farnz (subscriber, #17727)
In reply to: Obsolete C for you and me by pizza
Parent article: Modern C for Fedora (and the world)

But then we come back round to the beginning - why are you rebuilding code with a new compiler if no requirements have changed, and expecting it to behave exactly as it did when built with the old compiler? This goes double if your code depends on specifics of how the old compiler interpreted the code, rather than being code whose meaning is unambiguous.

And that, of course, leads to the big problem with legacy code - much of it (in all languages) is written "knowing" that if it passes tests when built with a single compiler, then it's good enough. But change anything (compiler, inputs, other bits and pieces), and it stops working.


to post comments

Obsolete C for you and me

Posted Dec 11, 2023 19:48 UTC (Mon) by pizza (subscriber, #46) [Link]

> But then we come back round to the beginning - why are you rebuilding code with a new compiler if no requirements have changed, and expecting it to behave exactly as it did when built with the old compiler?

Well, if nothing changes, then.. you don't need to do anything. (That was kinda my point with respect to my using "unmaintained" software in a production environment)

But more typically, requirements do change... eventually. You rarely know what those will be in advance, or what effort will be needed to handle it.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds