C++ Logo


Advanced search

Re: Poisoned initializers

From: Antoine Viallon <antoine_at_[hidden]>
Date: Sat, 12 Jun 2021 19:12:41 +0000
12 juin 2021 16:49 "Tom Honermann via Std-Proposals" <std-proposals_at_[hidden] (mailto:std-proposals_at_[hidden]?to=%22Tom%20Honermann%20via%20Std-Proposals%22%20<std-proposals_at_[hidden]>)> a écrit: In either case, I think there is a need to be able to propagate poison/taint. I know it might sound dump, but, like what we do with the nullptr keyword, wouldn't a new keyword, like "undefined" for instance, be the best solution for that? If a variable has this pseudo-value, it means to the compiler that it is uninitialized, and appropriate warnings can be fired if the compiler can prove a variable with the "undefined" value is being used. It would only have effects during compilation, and would be completely "removed" during runtime. What do you think? Antoine Viallon

Received on 2021-06-12 14:12:49