-------- Message transféré -------
De: "Antoine Viallon" <antoine@lesviallon.fr>
À: "Edward Catmur" <ecatmur@googlemail.com>
Envoyé: 13 juin 2021 00:35
Objet: Re: [std-proposals] Poisoned initializers

What does it mean to prove that an uninitialized value is used?

In some cases, the compiler might be unable to know if a value is undefined or not at compile time (for instance, if it is the return value of a function).

Actually, we want runtime effects; at least 3 distinct effects.

Runtime effects might be undesirable in C++, which has traditionally be very conservative in that regard.

In secure mode, we want a specific value to be loaded in place of the uninitialized value;

While it may be desirable, it may not always be possible. What value should a free'd pointer have?
What value should an undefined variable of a user-provided type have?

In my opinion, this keyword should have the same kind of effect the [[deprecated]] attribute has: to fire compiler warnings or errors if the function of variable is used.
The main difference with [[deprecated]] would be that theses warnings/errors depend on the value of the variable, and not on the variable itself.

Just my two cents,
Antoine Viallon