[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#103980: marked as done ([PR c++/3702] gcc-3.0 copies constructors)



Your message dated Sat, 11 Aug 2001 09:16:34 +0200
with message-id <15220.56274.868805.489858@gargle.gargle.HOWL>
and subject line not a bug: Bug#103980: g++-3.0: copies constructors
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 8 Jul 2001 20:54:47 +0000
>From liiwi@lonesom.pp.fi Sun Jul 08 15:54:47 2001
Return-path: <liiwi@lonesom.pp.fi>
Received: from ip212-226-133-178.adsl.kpnqwest.fi (jumper.lonesom.pp.fi) [::ffff:212.226.133.178] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 15JLZn-0001Gz-00; Sun, 08 Jul 2001 15:54:47 -0500
Received: by jumper.lonesom.pp.fi (Postfix, from userid 1000)
	id 4D06C61831; Sun,  8 Jul 2001 23:54:31 +0300 (EEST)
From: Jaakko Niemi <liiwi@lonesom.pp.fi>
Subject: g++-3.0: copies constructors
To: submit@bugs.debian.org
X-Mailer: bug 3.3.9
Message-Id: <20010708205431.4D06C61831@jumper.lonesom.pp.fi>
Date: Sun,  8 Jul 2001 23:54:31 +0300 (EEST)
Delivered-To: submit@bugs.debian.org

Package: g++-3.0
Version: N/A
Severity: normal

 SFS fails to compile with gcc 3.0, and it was tracked down to this 
example code that reproduces the error:

-------------
class aios {
  friend class aiosout;

public:
  aios ();
  ~aios ();
};

class aiosout {
  aiosout (const aiosout &o);
  aiosout &operator= (const aiosout &);
public:
  aiosout (aios &a) {}
  ~aiosout () {}
};

template<class T> inline const aiosout&
operator<< (const aiosout &o, const T &a)
{
  return o;
}

void fault(void)
{
  aios a;

  // normally a C++ compiler should resolve the following like this:
  //  tmp = aiosout(a)
  //  operator<< (tmp, 10);
  // apparently, g++ 3.0 tries to do something like this:
  //  tmp1 = aiosout(a)
  //  tmp2 = aiosout(tmp1)   <== copy constructor (unusable!)
  //  operator<< (tmp2, 10);
  // which is wasteful even when it works... maybe now we know why
  // g++ is known to take so much longer to compile stuff...

  a << 10;
}
-------------

 If you try to reproduce this with SFS sources, please use the cvs
version, as it has other gcc 3 related fixes already in. You can find
the cvs instructions from http://www.fs.net.

 If there is any other information that I can provide, please let me know.

	Thanks.

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux jumper 2.4.6 #1 Wed Jul 4 15:33:15 EEST 2001 i686 unknown


---------------------------------------
Received: (at 103980-done) by bugs.debian.org; 11 Aug 2001 07:20:32 +0000
>From doko@cs.tu-berlin.de Sat Aug 11 02:20:32 2001
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [130.149.17.13] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 15VT4S-0006Ak-00; Sat, 11 Aug 2001 02:20:32 -0500
Received: from bolero.cs.tu-berlin.de (doko@bolero.cs.tu-berlin.de [130.149.19.1])
	by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id JAA17279
	for <103980-done@bugs.debian.org>; Sat, 11 Aug 2001 09:16:35 +0200 (MET DST)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.10.2+Sun/8.9.3) id f7B7GYl14440;
	Sat, 11 Aug 2001 09:16:34 +0200 (MEST)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15220.56274.868805.489858@gargle.gargle.HOWL>
Date: Sat, 11 Aug 2001 09:16:34 +0200
To: 103980-done@bugs.debian.org
Subject: not a bug: Bug#103980: g++-3.0: copies constructors
In-Reply-To: <200107232130.f6NLUH108599@mira.informatik.hu-berlin.de>
References: <20010708205431.4D06C61831@jumper.lonesom.pp.fi>
	<200107232130.f6NLUH108599@mira.informatik.hu-berlin.de>
X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid
Delivered-To: 103980-done@bugs.debian.org

Martin v. Loewis writes:
 > >  SFS fails to compile with gcc 3.0, and it was tracked down to this 
 > > example code that reproduces the error:
 > 
 > This is not a bug in the compiler, but in your code.

closing the report. see http://bugs.debian.org/103980 for Martin's
full response.



Reply to: