The following code compiles with an error:

#include <string>

int main() {

  std::string s = 1234;

}

while this code compiles and runs, but produces garbage results:

#include <string>

int main() {

  std::string s;
  s = 1234;

}

-- 
           Summary: Type checking seems to break with string operator=
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: weage98 at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: gnu/linux i686


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22107

Reply via email to