This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/6403: assignment of int to string is not detected
- From: O dot Kullmann at Swansea dot ac dot uk
- To: gcc-gnats at gcc dot gnu dot org
- Date: 22 Apr 2002 11:36:06 -0000
- Subject: c++/6403: assignment of int to string is not detected
- Reply-to: O dot Kullmann at Swansea dot ac dot uk
>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: