[Bug c++/21235] New: [4.0 Regression] Trouble with friend and using namespace

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Tue Apr 26 11:49:00 GMT 2005


The below doesn't compile with 4.0:

class KopeteAwayDialog { KopeteAwayDialog(); };
namespace Kopete
{
  class Away
  {
    friend class KopeteAwayDialog;
  };
}
using namespace Kopete;
KopeteAwayDialog::KopeteAwayDialog(){}

novell78625.cc:10: error: 'KopeteAwayDialog' has not been declared
novell78625.cc:10: error: ISO C++ forbids declaration of 'KopeteAwayDialog' with
no type

This is a regression from 3.3/3.4. Current mainline is ok, however, most
probably due to these patches from Kriang:

2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>

	PR c++/4403
	PR c++/9783, DR433

2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>

	Friend class name lookup 5/n
	PR c++/1016

-- 
           Summary: [4.0 Regression] Trouble with friend and using namespace
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org,matz at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21235



More information about the Gcc-bugs mailing list