| ▲ | afdbcreid 3 hours ago | |||||||||||||
> It won't. Uninitialized memory can't have "very clearly defined behavior" without breaking essentially every single implementation, and WG14 is very loth to break existing implementations. You can initialize with some bit pattern. This is what was accepted for C++ (but only for certain types of memory). | ||||||||||||||
| ▲ | vbezhenar 2 hours ago | parent [-] | |||||||||||||
That's huge performance loss. Imagine doing useless initialization of multi-megabyte chunk of memory. Not acceptable for C programs. In fact I hate that C mandates static variables being initialized to zero. This is dumb. When I'm writing for MCU, that's useless cycles spent at the power on. Thankfully it's possible to fix with linker tricks, but it should not be an issue in the first place. | ||||||||||||||
| ||||||||||||||