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++/19291] Warning "cannot pass objects of non-POD type" should be an error


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


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