Computers should just know when I want a space to be part of a file name, and when I want them to be argument separators. No more escaping or quoting.
- 0 Posts
- 6 Comments
Don’t blame this on gcc or the library/function author - it is 100% user (i.e. programmer) error. Uninitialised memory of any type is undefined behaviour in the C and C++ abstract machine. That means optimising compilers can assume it does not exist.
For example, the compiler could see that your ‘b’ is never initialised. Therefore, using it would be undefined behaviour. So, the optimiser can assume it is never used, and it is as if that code simply does not exist: the behaviour you saw.
I’m not saying that is what happened, nor that it will always happen, but it is a possibility.
You know how some languages write left-to-right, and some rught-to-left? Endianness is that, for numbers.
Or another analogy is dates: 2025/12/31 is big endian, 31/12/2025 is little endian. And 12/31/2025 is middle endian. Which makes no sense at all because the middle is, by definition, not an end.
Shakespeare may have coined a lot of English words, but only Wallace can claim deez nuts.
So I killed the parent and the children became zombies.