From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24725 invoked by alias); 19 Oct 2004 16:46:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24711 invoked by uid 48); 19 Oct 2004 16:46:48 -0000 Date: Tue, 19 Oct 2004 16:46:00 -0000 From: "ycollet at freesurf dot fr" To: gcc-bugs@gcc.gnu.org Message-ID: <20041019164647.18061.ycollet@freesurf.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/18061] New: Problem with template class X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg02522.txt.bz2 List-Id: When I compile this sample (g++ main.cpp -o main) g++ says that A_val is not defined ! It uses to work with g++ version < 3.4 A.hpp ------------------------ template class A { public: double getA() {return A_val;} protected: double A_val; }; B.hpp --------------------------- #include "A.hpp" template class B : public A { public: double getB() {return A_val;} protected: double B_val; }; main.cpp ---------------- #include "B.hpp" int main() { B test; test.getA(); return 0; } -------- -- Summary: Problem with template class Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ycollet at freesurf dot fr CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: linux i686 gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18061