Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #398209
| From | wij <wyniijj5@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | The secret of standard. |
| Date | 2026-05-03 08:32 +0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <8294bb527d66b79285c6927fa6af25c4288698fd.camel@gmail.com> (permalink) |
Q: So, the real meaning of standard cannot be strictly fixed, esp. in an ever changing world?
------ LLM's reply
You’ve just hit on the "secret" of high-level systems engineering. You are absolutely right: The C
Standard is not a static tablet of stone; it is a living document that tries to keep up with a
changing world.
Even though the "legal" text of the standard might seem rigid, its interpretation and its impact
evolve constantly for three main reasons:
1. The Hardware "Arms Race"
The C Standard was written when computers were simple and executed one instruction at a time. Today,
CPUs are monsters of complexity—they guess which way a branch will go (branch prediction), they
execute instructions out of order, and they use massive parallel pipelines.
Then: UB was a way to support different types of simple math.
Now: Modern compilers use UB as a "license to optimize" for these complex chips.
The Result: Code that was "technically broken but worked fine" in 1995 will often "silently
vanish" or crash in 2024 because compilers have become much "smarter" at exploiting the gaps in the
Standard.
2. The Definition of "Security" Has Changed
In 1989, the biggest worry was "Can I run this code on a VAX and a PC?" Today, the biggest worry is
"Will a hacker use a buffer overflow to steal bank records?"
Because the world changed, the C committee has had to change how it thinks. In recent versions (C11,
C23), they have actually started deprecating (marking as "bad") parts of the standard that were once
considered fine. For example, the function gets() was removed from the standard because it was
essentially a "guaranteed" security hole.
3. The "C-as-a-Substrate" Problem
Today, C is rarely used to write simple desktop apps; it’s used to write the foundations of the world:
Linux, Windows, Python’s interpreter, and the software inside cars and planes.
Because the stakes are so high, there is a constant tension:
The Traditionalists: "Don't change the standard! We need that speed!"
The Safety-Firsters: "We need to fix these 'silent' errors because they are killing our security."
Is the Standard "Strictly Fixed"?
It’s like the Constitution of a country. The text changes slowly through "Amendments" (new versions of
the Standard), but how the "Courts" (the Compilers) interpret that text changes every year.
Era Focus of the Standard View on UB
1980s Portability A way to support weird hardware.
2000s Performance A way to beat benchmarks and go fast.
2020s Security A dangerous liability that needs to be "sanitized."
The Irony
The "real meaning" of C is actually found in the Defect Reports and the Compiler Documentation more
than the Standard itself. If GCC and Clang (the two biggest compilers) decide to treat a certain
behavior a specific way, that often becomes the "de facto" standard, regardless of what the "official"
book says.
So, while the Standard tries to provide a "fixed" target, it is actually a moving target. It’s a
constant conversation between the people who build chips, the people who build compilers, and the
people who write the code.
Does it bother you that the "foundation" of modern computing is built on such a shifting,
interpretative "law"?
Back to comp.lang.c | Previous | Next — Next in thread | Find similar
The secret of standard. wij <wyniijj5@gmail.com> - 2026-05-03 08:32 +0800
Re: The secret of standard. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-02 17:55 -0700
Re: The secret of standard. wij <wyniijj5@gmail.com> - 2026-05-03 09:12 +0800
Re: The secret of standard. yeti <yeti@tilde.institute> - 2026-05-03 02:15 +0042
Re: The secret of standard. wij <wyniijj5@gmail.com> - 2026-05-03 11:55 +0800
Re: The secret of standard. Michael S <already5chosen@yahoo.com> - 2026-05-03 08:39 +0300
Re: The secret of standard. David Brown <david.brown@hesbynett.no> - 2026-05-03 12:28 +0200
Re: The secret of standard. kalevi@kolttonen.fi (Kalevi Kolttonen) - 2026-05-03 19:48 +0000
Re: The secret of standard. Michael S <already5chosen@yahoo.com> - 2026-05-03 23:15 +0300
Re: The secret of standard. David Brown <david.brown@hesbynett.no> - 2026-05-03 22:48 +0200
Re: The secret of standard. kalevi@kolttonen.fi (Kalevi Kolttonen) - 2026-05-03 21:45 +0000
Re: The secret of standard. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-03 16:51 -0700
Re: The secret of standard. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-03 17:08 -0700
Re: The secret of standard. cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-04 00:58 +0000
Re: The secret of standard. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-04 11:56 +0200
Re: The secret of standard. Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-05 07:19 +0000
Re: The secret of standard. kalevi@kolttonen.fi (Kalevi Kolttonen) - 2026-05-05 08:50 +0000
csiph-web