public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/55866] New: [4.8 Regression] #include <auto_ptr.h> in C++11 mode
@ 2013-01-03 16:38 jakub at gcc dot gnu.org
  2013-01-03 16:55 ` [Bug libstdc++/55866] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-03 16:38 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55866
           Summary: [4.8 Regression] #include <auto_ptr.h> in C++11 mode
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


echo '#include <auto_ptr.h>' | g++ -std=gnu++0x -S -o /tmp/a.s -xc++ -
worked in 4.7, but doesn't work any longer in 4.8.  Apparently the snapper
package does this in one of the translation units (no idea why).
Is that an error in the package and it isn't supposed to include that header,
or is that something to fix on the libstdc++ side?
The problem started with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190109
where auto_ptr.h relies on a couple of headers it doesn't include itself (so
_Lock_policy, __shared_count etc. aren't defined).


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

* [Bug libstdc++/55866] [4.8 Regression] #include <auto_ptr.h> in C++11 mode
  2013-01-03 16:38 [Bug libstdc++/55866] New: [4.8 Regression] #include <auto_ptr.h> in C++11 mode jakub at gcc dot gnu.org
@ 2013-01-03 16:55 ` redi at gcc dot gnu.org
  2013-01-03 17:01 ` redi at gcc dot gnu.org
  2013-01-03 17:10 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2013-01-03 16:55 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-03 16:55:04 UTC ---
It's an error in the package and only worked "by accident" because
$PREFIX/include/c++/4.x.y/backward is in the include path, to allow <strstream>
to be found.

The only supported way to use std::auto_ptr is #include <memory>


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

* [Bug libstdc++/55866] [4.8 Regression] #include <auto_ptr.h> in C++11 mode
  2013-01-03 16:38 [Bug libstdc++/55866] New: [4.8 Regression] #include <auto_ptr.h> in C++11 mode jakub at gcc dot gnu.org
  2013-01-03 16:55 ` [Bug libstdc++/55866] " redi at gcc dot gnu.org
@ 2013-01-03 17:01 ` redi at gcc dot gnu.org
  2013-01-03 17:10 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2013-01-03 17:01 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-03 17:01:12 UTC ---
The header even says so, and has done so for years:

/** @file backward/auto_ptr.h
 *  This is an internal header file, included by other library headers.
 *  Do not attempt to use it directly. @headername{memory}
 */


The change was an important one that allows us to use unique_ptr and shared_ptr
internally in the library (e.g. in <future>) without depending on the whole of
<memory> and without pulling in the deprecated auto_ptr definition, as
discussed in the thread beginning at
http://gcc.gnu.org/ml/libstdc++/2012-06/msg00078.html

I don't want to revert it, and it would contradict how the entire library is
structured to make <backward/auto_ptr.h> pull in all its needed headers. If you
#include <memory> it works perfectly, anything else is unsupported.


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

* [Bug libstdc++/55866] [4.8 Regression] #include <auto_ptr.h> in C++11 mode
  2013-01-03 16:38 [Bug libstdc++/55866] New: [4.8 Regression] #include <auto_ptr.h> in C++11 mode jakub at gcc dot gnu.org
  2013-01-03 16:55 ` [Bug libstdc++/55866] " redi at gcc dot gnu.org
  2013-01-03 17:01 ` redi at gcc dot gnu.org
@ 2013-01-03 17:10 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-03 17:10 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-03 17:10:07 UTC ---
I have no problem with that, just noticed this during mass rebuild with gcc 4.8
and wanted to double check where the bug is.


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

end of thread, other threads:[~2013-01-03 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-03 16:38 [Bug libstdc++/55866] New: [4.8 Regression] #include <auto_ptr.h> in C++11 mode jakub at gcc dot gnu.org
2013-01-03 16:55 ` [Bug libstdc++/55866] " redi at gcc dot gnu.org
2013-01-03 17:01 ` redi at gcc dot gnu.org
2013-01-03 17:10 ` jakub at gcc dot gnu.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).