From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18542 invoked by alias); 26 Nov 2007 09:51:50 -0000 Received: (qmail 18534 invoked by uid 22791); 26 Nov 2007 09:51:50 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.171) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Nov 2007 09:51:46 +0000 Received: by ug-out-1314.google.com with SMTP id o38so997065ugd for ; Mon, 26 Nov 2007 01:51:43 -0800 (PST) Received: by 10.78.81.20 with SMTP id e20mr2522387hub.1196070703567; Mon, 26 Nov 2007 01:51:43 -0800 (PST) Received: by 10.78.133.11 with HTTP; Mon, 26 Nov 2007 01:51:43 -0800 (PST) Message-ID: <5826f8920711260151v894cf7dp7104763a9daf97a8@mail.gmail.com> Date: Mon, 26 Nov 2007 11:42:00 -0000 From: "Francois Coulon" To: gcc-help@gcc.gnu.org Subject: public method hidden by protected one MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00279.txt.bz2 We have thos two declarations in a class : public: const DonneesCP & getDonneesCP() const ; protected: DonneesCP &getDonneesCP(); We try to call the public one from outside the class, we have this error : /vobs/ERATO/SMET/SAD/PUB/Linux-x86_64/include/DonneesCP/InterfaceDonneesCP.= hpp:320: error: =AB erato::DonneesCP& erato::InterfaceDonneesCP::getDonneesCP() =BB is protected /vobs/ERATO/APP/OTDA/TUFA/src/TUFA/tuf.cpp:117: error: within this context If we remove the protected method, the error dissappears. Is this normal behaviour or not ? Thanks in advance