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]

[Bug c++/22107] Type checking seems to break with string operator=


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


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