Path: utzoo!utgpu!watmath!uunet!mcvax!hp4nl!tnosoes!tom From: tom@tnosoes.UUCP (Tom Vijlbrief) Newsgroups: gnu.g++.bug Subject: g++ 1.32 allows illegal implicit pointer conversion Keywords: g++ 1.32 Message-ID: <434@tnosoes.UUCP> Date: 26 Jan 89 10:37:57 GMT Organization: TNO Institute for Perception, Soesterberg, The Netherlands Lines: 31 g++ 1.32 (under SunOs 3.5, sun 3/60) allows the following program which is illegal according to Stroustrup's book (The C++ programming language), example on page 197. class base { int m1; public: int m2; }; class derived : base { }; derived d; base *pb= &d; // error (private base) ============================== CC -v -S der.cc g++ version 1.32.0 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix der.cc /tmp/cca07199.cpp GNU CPP version 1.32 /usr/local/lib/gcc-c++ /tmp/cca07199.cpp -quiet -dumpbase der.cc -noreg -version -o der.s GNU C++ version 1.32.0 (68k, MIT syntax) compiled by GNU C version 1.32. =============================================================================== Tom Vijlbrief TNO Institute for Perception P.O. Box 23 Phone: +31 34 63 62 77 3769 ZG Soesterberg E-mail: tnosoes!tom@mcvax.cwi.nl The Netherlands or: uunet!mcvax!tnosoes!tom ===============================================================================