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

            Bug ID: 70991
           Summary: Uninitialized class allowed if it came from
                    self-assignment, or a member function
           Product: gcc
           Version: 5.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: appfault at hotmail dot com
  Target Milestone: ---

g++ allows uninitialized class to be used for member variables (hitting
uninitialized memory), if the class was declared as an assignment to itself.

It's not clear whether this violates the C++ standard (it sure seems like it
would), but at the very least compiling with `g++ -Wall -Wextra test.cpp`
should generate a warning.

Reply via email to