c++/6403: assignment of int to string is not detected
O.Kullmann@Swansea.ac.uk
O.Kullmann@Swansea.ac.uk
Mon Apr 22 05:48:00 GMT 2002
>Number: 6403
>Category: c++
>Synopsis: assignment of int to string is not detected
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Mon Apr 22 04:46:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Oliver Kullmann
>Release: gcc 3.0.4
>Organization:
>Environment:
Linux
>Description:
An assignment of an integer value to a string variable
is not detected.
>How-To-Repeat:
#include <string>
#include <iostream>
int main() {
int i = 6;
std::string s;
s = i;
std::cout << s << "\n";
}
compiles without error messages
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list