https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107138
Freddie Chopin <freddie_chopin at op dot pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |freddie_chopin at op dot pl --- Comment #8 from Marco Clemencic <marco.clemencic at gmail dot com> --- That explains it then, thanks for the info. I admit I like the idea a lot. I'm just surprised that we do get warnings from the C++ standard library in some perfectly reasonable code... Now I have to decide what to do in my code. Probably I'll have to selectively suppress the warning, which is something I hate. But the warning is not issued in -O0 builds, which I believe means the code is correct by itself, but I have the feeling the warning gets checked after the optimizer refactored the code taking into account invariants already checked and at that point the "maybe-uninitialized" checker gets confused. If this is the case we can argue if it is the intended behavior or a bug in the way this new feature has been implemented. --- Comment #9 from Freddie Chopin <freddie_chopin at op dot pl> --- Possibly related/duplicate #107919