https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126868

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
[[indeterminate]] int a;
if (a == a) 
  all_is_good();
else 
  fire_missiles();
can fire_missiles() or do anything else, even in C++26.  And, so can
-ftrivial-auto-var-init=uninitialized when it is defined as if
[[indeterminate]] was implied on everything the attribute can appertain to.
Having a user a way to opt out is really necessary, while in a lot of code the
extra cost isn't that significant, e.g. in huge switches with a lot of
vacuously initialized variables in the scope of the switch body, the cost can
be significant.  And the users should have a way to opt out, not just to use
-std=c++23 forever because they aren't willing to accept the slowdowns.

Reply via email to