From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14664 invoked by alias); 7 Feb 2002 16:02:49 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 14521 invoked from network); 7 Feb 2002 16:02:42 -0000 Received: from unknown (HELO door.cgey.com) (193.234.248.10) by sources.redhat.com with SMTP; 7 Feb 2002 16:02:42 -0000 Received: from mailsweeper.capgemini.se (mailsweeper.capgemini.se [192.176.203.17]) by door.cgey.com (8.12.1/8.12.1) with ESMTP id g17G2dqA012696 for ; Thu, 7 Feb 2002 17:02:39 +0100 (MET) Received: from master01.capgemini.se (unverified) by mailsweeper.capgemini.se (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Thu, 7 Feb 2002 16:58:38 +0100 Received: by master01.capgemini.se with Internet Mail Service (5.5.2653.19) id <1JARXYRT>; Thu, 7 Feb 2002 17:02:51 +0100 Message-ID: From: "Hultman, Sten" To: "'gcc-help@gcc.gnu.org'" Subject: Problem with private methods Date: Thu, 07 Feb 2002 08:02:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2002-02/txt/msg00070.txt.bz2 Hi ! I have encountered a problem when turning from aCC to gcc 3.0.3 on HP-UX11.00. I enclose a short samle and the error messages. It works with no problem on aCC. I can't see why the streambuf methods are private in this context.or anyo Greatful for any hint ! Kindest regards Sten Hultman THE PROGRAM: #include using namespace std; class sockbuf: public streambuf { public: sockbuf (); sockbuf (const sockbuf&); sockbuf& operator = (const sockbuf&); virtual ~sockbuf (); }; sockbuf::sockbuf (const sockbuf& sb) : streambuf (sb) { } sockbuf& sockbuf::operator = (const sockbuf& sb) { if (this != &sb ) { streambuf::operator = (sb); this->sockbuf::~sockbuf(); } return *this; } THE COMPILER MESSAGES: [49] % g++ -c socktest.C -o socktest.o /home/jalpman/gnu32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.3/include/g++/bits /std_streambuf.h: In copy constructor `sockbuf::sockbuf(const sockbuf&)': /home/jalpman/gnu32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.3/include/g++/bits /std_streambuf.h:517: `std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char, _Traits = std::char_traits]' is private socktest.C:17: within this context /home/jalpman/gnu32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.3/include/g++/bits /std_streambuf.h: In member function `sockbuf& sockbuf::operator=(const sockbuf&)': /home/jalpman/gnu32/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.3/include/g++/bits /std_streambuf.h:520: `std::basic_streambuf<_CharT, _Traits>& std::basic_streambuf<_CharT, _Traits>::operator=(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char, _Traits = std::char_traits]' is private socktest.C:24: within this context COMPARISON WITH aCC: ] % [55] % aCC -c -AA -O -D__hpux__ -I. -I/opt/aCC/include_std socktest.C -o socktest.o [56] % This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.