From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6054 invoked by alias); 29 Jul 2002 13:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 6035 invoked by uid 71); 29 Jul 2002 13:26:01 -0000 Resent-Date: 29 Jul 2002 13:26:01 -0000 Resent-Message-ID: <20020729132601.6034.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, akim@epita.fr Received: (qmail 4055 invoked from network); 29 Jul 2002 13:22:24 -0000 Received: from unknown (HELO colt.epita.fr) (62.23.180.27) by sources.redhat.com with SMTP; 29 Jul 2002 13:22:24 -0000 Received: from hermes.epita.fr (hermes.epita.fr [163.5.255.10]) by colt.epita.fr id g6TDNh008987 Mon, 29 Jul 2002 15:23:43 +0200 (MEST) Received: from goa.lrde.epita.fr (mail@goa.lrde.epita.fr [10.223.13.2]) by hermes.epita.fr id g6TDNif29270 Mon, 29 Jul 2002 15:23:44 +0200 (MEST) Received: from nostromo.lrde.epita.fr ([10.223.13.52] ident=mail) by goa.lrde.epita.fr with esmtp (Exim 3.35 #1 (Debian)) id 17ZAVF-0007pf-00; Mon, 29 Jul 2002 15:24:01 +0200 Received: from akim by nostromo.lrde.epita.fr with local (Exim 3.35 #1 (Debian)) id 17ZAVE-0000MV-00; Mon, 29 Jul 2002 15:24:00 +0200 Message-Id: Date: Mon, 29 Jul 2002 06:26:00 -0000 From: akim@epita.fr To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org X-Send-Pr-Version: 3.113 Subject: c++/7433: Class::Constructor accepted X-SW-Source: 2002-07/txt/msg00764.txt.bz2 List-Id: >Number: 7433 >Category: c++ >Synopsis: Invoking (template?) ctors as Class::Class is accepted >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Mon Jul 29 06:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Akim Demaille >Release: 3.1.1 20020606 (Debian prerelease) (Debian testing/unstable) >Organization: >Environment: System: Linux nostromo 2.4.17 #9 Wed Jan 2 19:07:31 CET 2002 i686 unknown Architecture: i686 host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds1/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux >Description: G++ 3.1 accepts things like the following: typedef std::list list_t; list_t::list (l.begin (), l.end ()); while it should accept only: typedef std::list list_t; list_t (l.begin (), l.end ()); Neither Comeau, not icc accept this program: /tmp % cat -n bar.cc nostromo Err 1 1 #include 2 3 typedef std::list list_t; 4 5 int 6 main () 7 { 8 list_t l; 9 list_t l2 = list_t::list (l.begin (), l.end ()); 10 } /tmp % g++-3.1 --version nostromo 15:20 g++-3.1 (GCC) 3.1.1 20020606 (Debian prerelease) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. /tmp % g++-3.1 bar.cc nostromo 15:20 /tmp % g++-3.1 bar.cc -Wall nostromo 15:20 /tmp % g++-3.1 bar.cc -Wall -ansi nostromo 15:20 /tmp % como bar.cc nostromo 15:20 Comeau C/C++ 4.3.0 BETA#4 (Jun 9 2002 13:53:15) for Redhat_LINUX_INTEL_ELF Copyright 1988-2002 Comeau Computing. All rights reserved. MODE:non-strict warnings C++ "bar.cc", line 9: error: a constructor or destructor may not have its address taken list_t l2 = list_t::list (l.begin (), l.end ()); ^ 1 error detected in the compilation of "bar.cc". /tmp % icc bar.cc nostromo Err 2 bar.cc bar.cc(9): error: a nonstatic member reference must be relative to a specific object list_t l2 = list_t::list (l.begin (), l.end ()); ^ compilation aborted for bar.cc (code 2) >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: