https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109801
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Scott Zhong from comment #7)
> If I understand you correctly, the following example should produce an
> uninitialized variable diagnostics and the fact that it doesn't means it is
> a bug in the compiler?
No because that is all code that can be considered dead.
If you instead had:
```
#include <algorithm>
class table
{
public:
table()
: size_(0) {}
table(table&& other) {
std::swap(size_, other.size_);
}
~table();
private:
int size_;
};
int main()
{
table container(std::move(table()));
return (0);
}
```
GCC will warn correctly. as GCC does not know that ~table does not touch size_
at all.