This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19291] Warning "cannot pass objects of non-POD type" should be an error
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jan 2005 14:04:39 -0000
- Subject: [Bug c++/19291] Warning "cannot pass objects of non-POD type" should be an error
- References: <20050106134743.19291.loose@astron.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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