Obsolete C for you and me
Obsolete C for you and me
Posted Dec 11, 2023 16:59 UTC (Mon) by mb (subscriber, #50428)In reply to: Obsolete C for you and me by wahern
Parent article: Modern C for Fedora (and the world)
You are actually just saying that it didn't compile.
Which is exactly my point. It's not possible for a non-programmer to take a >20 year old program and just compile it with a modern compiler in a modern environment. There are so many reasons for this to fail. You listed a few of them.
Removing the features this article is about from the compiler will not really worsen the situation by any meaningful amount.
Posted Dec 11, 2023 19:20 UTC (Mon)
by wahern (subscriber, #37304)
[Link]
The places where the code falters largely relate to 1) its support for pre-ANSI C library interfaces, 2) a newer hardware architecture exposing non-standard code, and 3) non-POSIX extension APIs (e.g. gettext). I think this says something positive regarding the value of standards and backward compatibility.
Notably, some of the code does use K&R parameter lists. (At least the getopt_long compat implementation does, but on OpenBSD it was properly excluded from the build.) I'm not advocating for continued support for K&R, just pushing back against the notion that old code, and support for old code, has little value. 20 years isn't even that long in the grand scheme of things, especially in the context of a systems language like C.
Obsolete C for you and me