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

* [Bug libstdc++/43820] [4.4/4.5/4.6 regression] auto_ptr used with incomplete type no longer triggers warning
  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 ` 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
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-20 16:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from redi at gcc dot gnu dot org  2010-04-20 16:21 -------
Could be a front-end bug, but probably something in the library


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |libstdc++
     Ever Confirmed|0                           |1
      Known to fail|                            |4.4.3 4.5.0
      Known to work|                            |4.1.2
   Last reconfirmed|0000-00-00 00:00:00         |2010-04-20 16:21:38
               date|                            |
            Summary|auto_ptr used with          |[4.4/4.5/4.6 regression]
                   |incomplete type no longer   |auto_ptr used with
                   |triggers warning            |incomplete type no longer
                   |                            |triggers warning


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  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 ` chris at bubblescope dot net
  2010-04-20 17:18 ` paolo dot carlini at oracle dot com
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: chris at bubblescope dot net @ 2010-04-20 17:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from chris at bubblescope dot net  2010-04-20 17:10 -------
I think this is connected to the "suppress warning is the standard library"
pragma starting to actually work.


-- 

chris at bubblescope dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris at bubblescope dot net


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  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
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-20 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2010-04-20 17:17 -------
And frankly note that anything related to auto_ptr is very unlikely to change,
given the deprecation status, unless it's something like the code doesn't
compile anymore.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (2 preceding siblings ...)
  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
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: chris at bubblescope dot net @ 2010-04-20 17:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from chris at bubblescope dot net  2010-04-20 17:18 -------
Yes, in C++0x mode, we should just add a deprication warning for auto_ptr full
stop.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (3 preceding siblings ...)
  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
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-20 18:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from redi at gcc dot gnu dot org  2010-04-20 18:22 -------
sure, it's deprecated in C++0x mode, but it's a pretty bad regression that it
no longer warns in C++03 mode

Chris is right, -Wsystem-headers restores the warning


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (4 preceding siblings ...)
  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
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-20 18:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from paolo dot carlini at oracle dot com  2010-04-20 18:30 -------
To me it looks like a front-end issue.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (5 preceding siblings ...)
  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
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-20 18:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from paolo dot carlini at oracle dot com  2010-04-20 18:36 -------
Maybe I should clarify my earlier message: at this time in the life of
auto_ptr, it seems quite unlikely to me that we'll non-trivially change the
implementation only because a warning is not emitted anymore. If either the
change is trivial, or the issue is really a front-end issue (not limited to
auto_ptr, likely), then it would be fine of course.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (6 preceding siblings ...)
  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
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rlerallut at free dot fr @ 2010-04-20 18:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rlerallut at free dot fr  2010-04-20 18:41 -------
@Chris Jefferson : indeed, if I roll my own "auto_ptr" locally, I get the
proper warning, as well as if I use -Wsystem-headers (didn't know that one). 

@Paolo Carlini : I'm using the default standard mode for gcc 4.4, so I guess
that's C++03 in which std::auto_ptr is *not* deprecated.


By the way, there's no warning with -Wall or even -Wextra. Is there a flag
-Wabsolutely_all_warnings_we_promise  that I have missed and that would really
enable *all* warnings ?


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (7 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: chris at bubblescope dot net @ 2010-04-20 18:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from chris at bubblescope dot net  2010-04-20 18:53 -------
I don't think it's a front-end issue. '#pragma GCC system_header' is
specifically designed to stop warnings in headers. However, it stops 'good'
warnings as well as 'bad' warnings. 'system_header' could be extended to allow
(or disallow) specific warnings, but that seems like quite a major extension.

Romain: -Wsystem-headers will enable warnings in standard library types.
However note that you will get some warnings thrown up, which you won't be able
to work around.

The only real patch I can think of would be to avoid '#pragma GCC
system_header' being defined in C++03 mode, in <memory>. That would be a simple
patch like the below. The only problem is that this might left some other
warnings sneak back in. Something like (untested, sorry).


Index: memory
===================================================================
--- memory      (revision 158569)
+++ memory      (working copy)
@@ -44,7 +44,9 @@
 #ifndef _GLIBCXX_MEMORY
 #define _GLIBCXX_MEMORY 1

+#ifdef __GXX_EXPERIMENTAL_CXX0X__
 #pragma GCC system_header
+#endif

 /**
  * @defgroup memory Memory


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (8 preceding siblings ...)
  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
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-20 18:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from paolo dot carlini at oracle dot com  2010-04-20 18:59 -------
Nah, the pragma must stay, we have it everywhere, consistently. And I really do
not understand why auto_ptr is *so* special to need more warnings to be spilled
vs *all* the rest of the library in order to be used safely. Ah, yes, it's
broken, forgot ;) Really, if this is the ultimate analysis of the issue, I
disagree with doing *anything*.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (9 preceding siblings ...)
  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
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rlerallut at free dot fr @ 2010-04-20 19:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rlerallut at free dot fr  2010-04-20 19:09 -------
I don't think auto_ptr is special and I, as a mere user, would appreciate you
didn't hide *helpful* warnings from anywhere (but I do also appreciate your
efforts in limiting spurious warnings !).

I have the option of using boost's scoped_ptr (which wouldn't have compiled in
the first place, even better) so I won't argue the issue any longer.

Thank you all for your time.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (10 preceding siblings ...)
  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
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-21  9:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from redi at gcc dot gnu dot org  2010-04-21 09:23 -------
(In reply to comment #8)
> By the way, there's no warning with -Wall or even -Wextra. Is there a flag
> -Wabsolutely_all_warnings_we_promise  that I have missed and that would really
> enable *all* warnings ?

No, sorry, there isn't. 

(In reply to comment #10)
> Nah, the pragma must stay, we have it everywhere, consistently. And I really do
> not understand why auto_ptr is *so* special to need more warnings to be spilled
> vs *all* the rest of the library in order to be used safely. Ah, yes, it's
> broken, forgot ;) Really, if this is the ultimate analysis of the issue, I
> disagree with doing *anything*.

:)
the reason isn't that it's broken, it's that various members of auto_ptr
require the expression "delete _M_ptr" to be well-formed, and warning users
when it's not well-formed is very useful.  Previously we never added a check
because the front-end warned.

even if you don't care about auto_ptr (and I still do) THIS AFFECTS SHARED_PTR
TOO!

We no longer warn on this:

struct C;
C* f();
std::shared_ptr<C> p( f() );


Chris's patch definitely won't work, since it would affect the rest of <memory>
not just auto_ptr.  Something like "#pragma pop GCC system_header" would work,
and would also make the attribute((deprecated)) on auto_ptr work again!

For the std::shared_ptr case I will add a static_assert like we use in
unique_ptr.  tr1::shared_ptr will have to use an array of sizeof(T) length or
something


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (11 preceding siblings ...)
  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
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-21  9:36 UTC (permalink / raw)
  To: gcc-bugs



-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |redi at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-04-20 16:21:38         |2010-04-21 09:36:11
               date|                            |


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (12 preceding siblings ...)
  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
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-21 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from paolo dot carlini at oracle dot com  2010-04-21 17:04 -------
static_asserts are fine, of course. Otherwise, if the real issue is that errors
coming from system headers are suppressed and shouldn't, sometimes, from the
user point of view, that is a **front-end** issue, about the semantics of the
pragma. Actually, I'm sure it has been discussed already, somewhere, Ian also
participated (this PR could well be a duplicate), and the front-end people
should be involved in the discussion.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (13 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-21 17:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from paolo dot carlini at oracle dot com  2010-04-21 17:11 -------
Forgot: before doing anything about those diagnostic issues, we should double
check what other compilers do with / without our library, thus, say current ICC
/ something else (even among those available online, Comeau, Dinkumware...)


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (14 preceding siblings ...)
  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
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-21 17:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from redi at gcc dot gnu dot org  2010-04-21 17:41 -------
Comeau warns on the auto_ptr case.  boost::shared_ptr refuses to compile if the
type is incomplete


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (15 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-21 18:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from paolo dot carlini at oracle dot com  2010-04-21 18:18 -------
Note I'm traveling, thus I have limited capabilities. I strongly recommend
digging out that conversation about the pragma itself, with Ian too involved,
and trying to put to good use static_asserts and any other template-based
tricks, per boost.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (16 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-21 18:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from redi at gcc dot gnu dot org  2010-04-21 18:26 -------
ok, thanks for the pointers, I'll hunt for the discussion


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (17 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-04-21 18:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from paolo dot carlini at oracle dot com  2010-04-21 18:48 -------
c++/43167 ?


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (18 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-21 18:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from redi at gcc dot gnu dot org  2010-04-21 18:59 -------
thanks!


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (19 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-11 13:29 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.5


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (20 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-19 12:35 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
            Version|unknown                     |4.4.3


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (21 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-05-27 10:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from redi at gcc dot gnu dot org  2010-05-27 10:55 -------
I have a patch which causes an error if std::shared_ptr or std::tr1::shared_ptr
is constructed with a pointer to incomplete type and no custom deleter.  I'm
not sure what the best approach is for auto_ptr. Technically it's invalid to
instantiate auto_ptr with an incomplete type, but in practice only reset() and
~auto_ptr() need the complete type. I can make it an error to instantiate those
members with an incomplete type, but that could break some invalid programs
which previously compiled with a warning and ran (with undefined behaviour)
For now I'll make the shared_ptr changes...


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (22 preceding siblings ...)
  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
  25 siblings, 0 replies; 27+ messages in thread
From: paolo at gcc dot gnu dot org @ 2010-05-31 18:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from paolo at gcc dot gnu dot org  2010-05-31 18:41 -------
Subject: Bug 43820

Author: paolo
Date: Mon May 31 18:41:33 2010
New Revision: 160082

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160082
Log:
2010-05-31  Jonathan Wakely  <jwakely.gcc@gmail.com>

        PR libstdc++/43820
        * include/bits/shared_ptr_base.h: Require complete type.
        * include/tr1/shared_ptr.h: Likewise.
        * testsuite/20_util/shared_ptr/cons/43820.cc: New.
        * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc: New.

Added:
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820.cc
   
trunk/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/shared_ptr_base.h
    trunk/libstdc++-v3/include/tr1/shared_ptr.h


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (23 preceding siblings ...)
  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
  25 siblings, 0 replies; 27+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-10 13:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from paolo dot carlini at oracle dot com  2010-06-10 13:38 -------
Jon, I would recommend closing this. We don't want to fiddle with auto_ptr
anyway, and the small issue with shared_ptr is fixed for 4.6.0.


-- 


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


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

* [Bug libstdc++/43820] [4.4/4.5/4.6 Regression] auto_ptr used with incomplete type no longer triggers warning
  2010-04-20 16:11 [Bug c++/43820] New: auto_ptr used with incomplete type no longer triggers warning rlerallut at free dot fr
                   ` (24 preceding siblings ...)
  2010-06-10 13:38 ` paolo dot carlini at oracle dot com
@ 2010-06-10 13:54 ` redi at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-10 13:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from redi at gcc dot gnu dot org  2010-06-10 13:54 -------
we have regressed in terms of the warning, but no diagnostic is required and
auto_ptr is deprecated in C++0x, so WONTFIX


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |WONTFIX


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