Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by torstenvl on Sunday July 09, 2023 @12:25PM
(#36655849)
> From cryptic "undefined behaviors" to . . . [the] lack of a single reference implementation of the compiler/libC, and you have a language that is harsh to defend.
I think you're confused, because this is internally incoherent.
In single reference implementation languages, all behavior is undefined behavior. Undefined behavior is just behavior for which there are no requirements imposed by the international standard. It's an unbounded form of implementation-defined behavior.
The vast, vast majority of C undefined behavior just isn't a real problem with common compilers and/or can be trivially addressed. If you're afraid of integer overflow, for example, you can simply call GCC or Clang with -fwrapv, or use one of the builtins.
I think you're confused, because this is internally incoherent.
In single reference implementation languages, all behavior is undefined behavior. Undefined behavior is just behavior for which there are no requirements imposed by the international standard. It's an unbounded form of implementation-defined behavior.
The vast, vast majority of C undefined behavior just isn't a real problem with common compilers and/or can be trivially addressed. If you're afraid of integer overflow, for example, you can simply call GCC or Clang with -fwrapv, or use one of the builtins.