[Bug c++/19291] Warning "cannot pass objects of non-POD type" should be an error
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jan 6 14:04:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-06 14:04 -------
(In reply to comment #0)
> <code>
> #include <string>
> #include <cstdio>
> int main()
> {
> std::string s("Hello World");
> printf("%s\n", s);
> return 0;
> }
> </code>
It cannot be as it is only undefined behavior and the C++ (and C standard by the way) says that
undefined behavior cannot be an error only a warning.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19291
More information about the Gcc-bugs
mailing list