paolo@semto.UUCP (Paolo Zeppegno) (05/02/89)
I'm not c++ guru, but I think the following program should not compile (for people not familiar with InterViews Banner is a subclass of Interactor) g++ 1.34.2 compiles this without a warning.. #include <InterViews/world.h> #include <InterViews/banner.h> test(Interactor p) { printf("%d\n", sizeof p); } main() { Banner *foo = 0; printf("%d\n", sizeof *foo); test(*foo); } g++ version 1.34.2 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dvax -Dunix -D__vax__ -D__unix__ prova.c /tmp/cc003707.cpp GNU CPP version 1.34 /usr/local/lib/gcc-c++ /tmp/cc003707.cpp -quiet -dumpbase prova.c -g -version - o /tmp/cc003707.s GNU C++ version 1.32.0 (vax) compiled by GNU C version 1.34.
tiemann@YAHI.STANFORD.EDU (Michael Tiemann) (05/03/89)
Date: 2 May 89 16:15:25 GMT From: mcvax!i2unix!semto!paolo@uunet.uu.net (Paolo Zeppegno) Organization: Systems & Management (Torino - Italy) Sender: bug-g++-request@prep.ai.mit.edu I'm not c++ guru, but I think the following program should not compile (for people not familiar with InterViews Banner is a subclass of Interactor) g++ 1.34.2 compiles this without a warning.. #include <InterViews/world.h> #include <InterViews/banner.h> test(Interactor p) { printf("%d\n", sizeof p); } main() { Banner *foo = 0; printf("%d\n", sizeof *foo); test(*foo); } g++ version 1.34.2 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dvax -Dunix -D__vax__ -D__unix__ prova.c /tmp/cc003707.cpp GNU CPP version 1.34 /usr/local/lib/gcc-c++ /tmp/cc003707.cpp -quiet -dumpbase prova.c -g -version - o /tmp/cc003707.s GNU C++ version 1.32.0 (vax) compiled by GNU C version 1.34. First, I claim that it should compile, since you can make an interactor from a banner, since interactor is a public base class of banner. This is a legal, default conversion. Second, you have the 1.34.2 driver, but the compiler being accessed is version 1.32.0. You should run the installation procedure so that the latest compiler (c++) is accessed by the latest driver (g++). Then you should get consistent (1.34, 1.34.2) version numbers. Michael