public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/4312: g++ accepts vector<auto_ptr<Class> >
@ 2001-12-28 14:52 pme
  0 siblings, 0 replies; 2+ messages in thread
From: pme @ 2001-12-28 14:52 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, pme, schmid

Synopsis: g++ accepts vector<auto_ptr<Class> >

Responsible-Changed-From-To: unassigned->pme
Responsible-Changed-By: pme
Responsible-Changed-When: Fri Dec 28 14:52:33 2001
Responsible-Changed-Why:
    I changed it.
State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Fri Dec 28 14:52:33 2001
State-Changed-Why:
    Thank you for your bug report.
    
    There's no way for the compiler to detect this problem,
    at present.  Doing so would require the compiler itself
    to test for "assignability".  If the user configures with
    --enable-concept-checks, then the library will perform
    such tests, and the example code you gave fails to compile
    (in the _SGIAssignableConcept).
    
    Moving those kinds of tests into the compiler proper would
    be a wonderful aid to diagnostics, but I don't believe
    anybody is working on such a project at present.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4312


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

* libstdc++/4312: g++ accepts vector<auto_ptr<Class> >
@ 2001-09-12 13:46 Peter Schmid
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Schmid @ 2001-09-12 13:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4312
>Category:       libstdc++
>Synopsis:       g++ accepts vector<auto_ptr<Class> >
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 12 13:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Peter Schmid
>Release:        3.0.1
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.9 #7 Sun Aug 19 16:36:18 CEST 2001 i686 unknown
Architecture: i686
SuSE 7.1
Linux 2.4.9
binutils 2.11.90.0.23
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.0.1/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
>Description:
According item 8 of the book Effective STL by Scott Meyers code
attempting to use STL containers of auto_ptr should not
compile. Alas, gcc 3.0.1 compiles the following source code tav.C
without a compiler message.  

>How-To-Repeat:
Source code tav.C

#include <memory>
#include <vector>

class Widget {};

using namespace std;

int main()
{
    vector<auto_ptr<Widget> > widgets;
}

Compiling tav.C

g++ -v tav.C -W -Wall
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/specs
Configured with: ../gcc-3.0.1/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
Thread model: posix
gcc version 3.0.1
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tav.C -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase tav.C -W -Wall -version -o /tmp/cc6dwwyr.s
GNU CPP version 3.0.1 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0.1 (i686-pc-linux-gnu)
	compiled by GNU C version 3.0.1.
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccN4DiR9.o /tmp/cc6dwwyr.s
GNU assembler version 2.11.90.0.23 (i686-pc-linux-gnu) using BFD version 2.11.90.0.23
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtbegin.o -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../../../i686-pc-linux-gnu/lib -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../.. /tmp/ccN4DiR9.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtend.o /usr/lib/crtn.o
    
    

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-12-28 22:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-28 14:52 libstdc++/4312: g++ accepts vector<auto_ptr<Class> > pme
  -- strict thread matches above, loose matches on Subject: below --
2001-09-12 13:46 Peter Schmid

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