From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16342 invoked by alias); 14 Jan 2002 20:58:48 -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 16293 invoked from network); 14 Jan 2002 20:58:45 -0000 Received: from unknown (HELO marvin.castle) (212.185.241.222) by sources.redhat.com with SMTP; 14 Jan 2002 20:58:45 -0000 Received: from zem.castle ([10.0.42.2] helo=there ident=johannes) by marvin.castle with smtp (Exim 3.33 #1 (Debian)) id 16QEBo-0005NP-00 for ; Mon, 14 Jan 2002 21:58:44 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Johannes Schmidt To: gcc-help@gcc.gnu.org Subject: gcc-3.0.3 + glut Date: Mon, 14 Jan 2002 12:58:00 -0000 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: X-SW-Source: 2002-01/txt/msg00141.txt.bz2 Hi, if I link my application with glut (-lglut), my program seg faults (or sig ills, it depends upon the optimization level) whenever I try to dynamic_cast an object. This does not happen with gcc-2.95.3. minimal example: #include class Base { public: virtual ~Base() {}; }; class A : public Base { }; int main(int argc, char ** argv) { A * a = new A(); Base * base = a; std::cerr << "implicit cast Base * base = a; \n"; A * a2 = dynamic_cast(base); std::cerr << "explicit cast A * a2 = dynamic_cast(base); \n"; } compile instruction: g++-3.0 test_cpp.cpp -o test_cpp -lglut system: Debian GNU/Linux gcc version 3.0.3 Thanks, Johannes