Question
In C++26, are implementations required to "initialize" uninitialized variables to some fixed byte pattern?
In C++26, reading uninitialized variables is no longer undefined, it's "erroneous" now (What is erroneous behavior? How is it different from undefined behavior?).
However, the wording for this confuses me:
otherwise, the bytes have erroneous values, where each value is determined by the implementation independently of the state of the program.
(bold mine)
To me, this reads like the implementation must overwrite the values with something (e.g. 0xBEBEBEBE
), because leaving them truly uninitialized might make them dependent on the "state of the program", contradicting the bold part.
Is my interpretation correct? Are implementations forced to overwrite uninitialized variables now?