public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43820]  New: auto_ptr used with incomplete type no longer triggers warning
@ 2010-04-20 16:11 rlerallut at free dot fr
  2010-04-20 16:22 ` [Bug libstdc++/43820] [4.4/4.5/4.6 regression] " redi at gcc dot gnu dot org
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: rlerallut at free dot fr @ 2010-04-20 16:11 UTC (permalink / raw)
  To: gcc-bugs

The following code used to trigger a warning with gcc 4.2 and 4.3 but passes
silently with 4.4 and 4.5:

=====================================
#include <memory>

struct S;

int main()
{
   std::auto_ptr<S> p( (S*) 1234 );
}
=====================================

This code triggers a segfault but when the pointer is actually from a real
object, then its destructor simply is not called and resources are leaked.


-- 
           Summary: auto_ptr used with incomplete type no longer triggers
                    warning
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rlerallut at free dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43820


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2010-06-10 13:54 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
2010-04-20 16:22 ` [Bug libstdc++/43820] [4.4/4.5/4.6 regression] " redi at gcc dot gnu dot org
2010-04-20 17:10 ` [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] " chris at bubblescope dot net
2010-04-20 17:18 ` paolo dot carlini at oracle dot com
2010-04-20 17:19 ` chris at bubblescope dot net
2010-04-20 18:22 ` redi at gcc dot gnu dot org
2010-04-20 18:31 ` paolo dot carlini at oracle dot com
2010-04-20 18:36 ` paolo dot carlini at oracle dot com
2010-04-20 18:41 ` rlerallut at free dot fr
2010-04-20 18:54 ` chris at bubblescope dot net
2010-04-20 18:59 ` paolo dot carlini at oracle dot com
2010-04-20 19:10 ` rlerallut at free dot fr
2010-04-21  9:23 ` redi at gcc dot gnu dot org
2010-04-21  9:36 ` redi at gcc dot gnu dot org
2010-04-21 17:04 ` paolo dot carlini at oracle dot com
2010-04-21 17:11 ` paolo dot carlini at oracle dot com
2010-04-21 17:41 ` redi at gcc dot gnu dot org
2010-04-21 18:18 ` paolo dot carlini at oracle dot com
2010-04-21 18:27 ` redi at gcc dot gnu dot org
2010-04-21 18:49 ` paolo dot carlini at oracle dot com
2010-04-21 18:59 ` redi at gcc dot gnu dot org
2010-05-11 13:29 ` rguenth at gcc dot gnu dot org
2010-05-19 12:35 ` rguenth at gcc dot gnu dot org
2010-05-27 10:55 ` redi at gcc dot gnu dot org
2010-05-31 18:42 ` paolo at gcc dot gnu dot org
2010-06-10 13:38 ` paolo dot carlini at oracle dot com
2010-06-10 13:54 ` redi at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).