This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22107] Type checking seems to break with string operator=
- From: "weage98 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2005 21:27:08 -0000
- Subject: [Bug c++/22107] Type checking seems to break with string operator=
- References: <20050617201123.22107.weage98@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From weage98 at yahoo dot com 2005-06-17 21:27 -------
Ok. This also compiles without warnings:
#include <string>
int main() {
std::string s;
long l = 1234;
s = l;
}
Aparently the compiler is doing automatic type conversion from long to char;
however, it does not warn about this with the following options enabled: -Wall
-pedantic -W -Wconversion
I don't see an operator=(long) definition for string in libstdc++.
Is there a warning option that I am missing here? Has this warning been
included in newer releases?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22107