public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Matthias Klose <doko@klose.in-berlin.de>
To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org
Subject: libstdc++/3551: error in auto_ptr implementation
Date: Tue, 03 Jul 2001 15:26:00 -0000	[thread overview]
Message-ID: <E15HYO1-0003xE-00@gate.local> (raw)

>Number:         3551
>Category:       libstdc++
>Synopsis:       error in auto_ptr implementation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 03 15:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Wichert Akkerman <wichert@cistron.nl>
>Release:        3.0 (Debian GNU/Linux)
>Organization:
The Debian project
>Environment:
System: Debian GNU/Linux (testing/unstable)
Architecture: i686
	
host: i386-linux
build: i386-linux
target: i386-linux
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
[ Reported to the Debian BTS as report #101371.
  Please CC 101371-quiet@bugs.debian.org on replies.
  Log of report can be found at http://bugs.debian.org/101371 ]
 	
The code below does not compile with g++ 3.0, but it seems correct
judging by my C++ books.

Wichert.

#include <memory>
#include <list>
using namespace std;
int main(int, char**) {
  auto_ptr<int> api(new int(5));
  list<auto_ptr<int> > lapi;
  lapi.push_back(api);

  return 0;
}

[Comment by Laurent Bonnaud <Laurent.Bonnaud@inpg.fr>:]

This one is much more complicated.  I agree with Wichert that this
should work, but this is much more involved.  I could not think about
an easy fix.

If you look at /usr/include/g++-v3/bits/std_memory.h, you'll see this
comment that lacks precision:

  // According to the C++ standard, these conversions are required.  Most
  // present-day compilers, however, do not enforce that requirement---and,
  // in fact, most present-day compilers do not support the language
  // features that these conversions rely on.

The methods it refers too are crucial in making this testcase work.  So
the real question is: does g++ 3.0 support the necessary language
features ?

>How-To-Repeat:
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-07-03 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-03 15:26 Matthias Klose [this message]
2001-07-03 16:16 Gabriel Dos Reis
2001-07-03 16:16 Ross Smith
2001-07-03 16:17 gdr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E15HYO1-0003xE-00@gate.local \
    --to=doko@klose.in-berlin.de \
    --cc=debian-gcc@lists.debian.org \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).