This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/6403: assignment of int to string is not detected



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]