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

Bug#284973: marked as done ([fixed in 4.1] name lookup is broken with friends)

Your message dated Tue, 7 Jun 2005 21:32:52 -0400
with message-id <20050608013252.GA18046@mirrorlynx.com>
and subject line Not a bug
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.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 9 Dec 2004 21:57:26 +0000
>From Woebbeking@web.de Thu Dec 09 13:57:26 2004
Return-path: <Woebbeking@web.de>
Received: from master.debian.org [] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CcWHu-0004zT-00; Thu, 09 Dec 2004 13:57:26 -0800
Received: from p508624f3.dip0.t-ipconnect.de (terra.local) [] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CcWHt-0003O0-00; Thu, 09 Dec 2004 15:57:25 -0600
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="ISO-8859-15"
From: Andre Woebbeking <Woebbeking@web.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: g++-4.0: name lookup is broken
X-Mailer: reportbug 3.4
Date: Thu, 09 Dec 2004 22:57:24 +0100
X-Debbugs-Cc: Woebbeking@web.de
Message-Id: <E1CcWHt-0003O0-00@master.debian.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-9.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	OUR_MTA_MSGID,X_DEBBUGS_CC autolearn=ham 

Package: g++-4.0
Version: 4.0-0pre2
Severity: important
Tags: experimental


the following code doesn't compile:

struct A {};

namespace Boo
struct B
    friend struct A;

    B(const A&) {};

int main()
    A a;
    Boo::B b(a);
    return 0;

It compiles with g++ < 4.0.


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-1-k7
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

Versions of packages g++-4.0 depends on:
ii  gcc-4.0                     4.0-0pre2    The GNU C compiler
ii  gcc-4.0-base                4.0-0pre2    The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-19 GNU C Library: Shared libraries an
ii  libstdc++6-4.0-dev          4.0-0pre2    The GNU Standard C++ Library v3 (d

-- no debconf information

Received: (at 284973-done) by bugs.debian.org; 8 Jun 2005 01:29:23 +0000
>From dan@mirrorlynx.com Tue Jun 07 18:29:23 2005
Return-path: <dan@mirrorlynx.com>
Received: from outbound.mailhop.org [] (mailnull)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DfpNj-0002fr-00; Tue, 07 Jun 2005 18:29:23 -0700
Received: from pool-68-238-242-169.phlapa.fios.verizon.net ([] helo=mirrorlynx.com)
	by outbound.mailhop.org with esmtpsa (TLSv1:RC4-SHA:128)
	(Exim 4.51)
	id 1DfpNi-000A4G-7V
	for 284973-done@bugs.debian.org; Tue, 07 Jun 2005 21:29:22 -0400
Received: from dan by mirrorlynx.com with local (Exim 4.34)
	id 1DfpR6-0004n4-Lw
	for 284973-done@bugs.debian.org; Tue, 07 Jun 2005 21:32:53 -0400
X-Mail-Handler: MailHop Outbound by DynDNS.org
X-Report-Abuse-To: abuse@dyndns.org (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information)
X-MHO-User: DanWeber1
Date: Tue, 7 Jun 2005 21:32:52 -0400
To: 284973-done@bugs.debian.org
Message-ID: <20050608013252.GA18046@mirrorlynx.com>
Mime-Version: 1.0
Content-Disposition: inline
X-Operating-System: Debian GNU/Linux 3.1 2.6.10-cko1-mppe
X-Editor: jed version: 0.99.16/Unix
X-MailServer: Exim 4.34-1
User-Agent: Mutt/1.5.9i
From: Dan Weber <dan@mirrorlynx.com>
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Rcpt-To: 284973-done@bugs.debian.org
X-SA-Exim-Mail-From: dan@mirrorlynx.com
Subject: Not a bug
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="45Z9DzgjV8m4Oswq"
X-SA-Exim-Version: 4.1 (built Tue, 17 Aug 2004 11:06:07 +0200)
X-SA-Exim-Scanned: Yes (on mirrorlynx.com)
Delivered-To: 284973-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This isn't a bug.  By declaring friend struct A inside of the namespace
Boo, you have created a prototype for it in the *Boo* namespace.  This is not an issue with the
compiler at all.  In fact, this is a very strict interpretation of the
code, which is a good thing (TM).  To solve the situation, just set it
like this:

struct A {};

namespace Boo
struct B
    friend struct ::A; // Note the :: for global namespace

    B(const A&) {};

int main()
    A a;
    Boo::B b(a);
    return 0;

By declaring ::A in the friend, it makes it the only prototyped struct A, thus the constructor will take that A.

Dan Weber

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (GNU/Linux)



Reply to: